0

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

4

1 回答 1

0

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

$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');
于 2011-08-03T15:44:46.180 回答