php 5.3 gd,GD和php 5.3中的字距调整问题

下载字体后,我试图用我的家用机器复制中间图像(Ubuntu字体系列的0.71.2版本). Arch Linux,x86_64,PHP 5.3.6,GD 2.0.34(捆绑),Suhosin补丁,FreeType 2.4.4.我最好在e和x上进行字距调整.

图像生成:

$img = imagecreatetruecolor(158, 72);

imagesavealpha($img, true);

$bg = imagecolorallocatealpha($img, 0, 0, 0, 127);

$black = imagecolorallocate($img, 0, 0, 0);

imagefill($img, 0, 0, $bg);

$text = "testar text"; // - was attempt at no aa, like example

imagettftext($img, 24, 0, 0, 36, -($black), 'Ubuntu-M', $text);

$text = "med text";

imagefttext($img, 24, 0, 12, 72, $black, 'Ubuntu-M', $text);

imagepng($img, 'test.png');

imagedestroy($img);

?>

输出:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值