【问题标题】:How I can disable font smoothing on imagick?如何在 imagick 上禁用字体平滑?
【发布时间】:2010-07-01 23:08:05
【问题描述】:

我用php+imagick 不能关闭字体平滑。当我使用GD时,可以简单地设置负字体颜色和平滑关闭。

【问题讨论】:

  • 嗯。这可能很困难。能具体说明一下你想要达到什么样的效果吗?
  • 您是在使用扩展程序,还是在使用单个程序?

标签: php fonts imagick smoothing


【解决方案1】:

这是一个如何在没有字体平滑的情况下呈现文本的示例:

$background = new Imagick('path/to/image.png');
$drawText = new ImagickDraw();
$drawText->setfont('images/hoogles.ttf');
$drawText->settextantialias(false);
$drawText->annotation(0, 0, 'Hello world!');
$background->drawimage($drawText);
$background->writeimage('path/to/result.png');

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-01-28
    • 1970-01-01
    • 2012-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-26
    • 2015-06-07
    相关资源
    最近更新 更多