PHP使用imagettftext()和imagefttext()函数更新字距调整问题 [英] PHP update kerning problem with imagettftext() and imagefttext() functions

查看:2613
本文介绍了PHP使用imagettftext()和imagefttext()函数更新字距调整问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的开发服务器最近升级到PHP v5.2.13。通过升级,我们发现我们的png图像存在字距调整(字母间距)问题。我们尝试了很多字体,还没有找到解决方案。

Our dev server was recently upgraded to PHP v5.2.13. With that upgrade we have found that our png images are having kerning (letter spacing) problems. We've tried numerous fonts and haven't found a solution yet.

我们使用GD库创建图像,并使用字体文件和imagettftext将文本写入图像()或imagefttext()函数。

We are creating images using the GD library and writing text to the images using font files and the imagettftext() or imagefttext() functions.

是否还有其他人遇到此问题?我误解了某些内容还是应该将其作为错误提交给PHP?有没有我没想过的很酷的解决方法?

Has anyone else run into this? Am I misunderstanding something or should this be submitted to PHP as a bug? Are there any cool workarounds I haven't thought of yet?

这是新老tahoma粗体的一个例子。其他字体(粗体和非粗体)也有同样的问题。一些字母和数字看起来像是偏离中心或类似的东西。

Here's an example of the new and old tahoma bold. Other fonts (bold and non-bold) have the same problem. Some letters and numbers seem like they're off-center or something like that.

坏 - 新PHP
http://img651.imageshack.us/ img651 / 4894 / bade.th.jpg'border ='0'/>
http://yfrog.com / i3badej

好 - 旧的PHP v5.2.11(单词略有不同,因为这是我们的开发服务器,另一个是实时服务器)
http://img651.imageshack.us/img651/2067/goodl.png'border ='0'/>
http://yfrog.com/i3goodlp

Good - old PHP v5.2.11 (the words are slightly different because this is our dev server and the other one is the live server) http://img651.imageshack.us/img651/2067/goodl.png' border='0'/> http://yfrog.com/i3goodlp

提前致谢!

Neil

编辑:嗯,尝试使用imageshack嵌入图像但不起作用。添加链接。

hmmm, tried to embed images using imageshack but did not work. Added links instead.

推荐答案

跟踪是一个类似的术语,用于设置文本的紧密或松散程度。你可能有更好的运气谷歌搜索,如这个结果

"Tracking" is a similar term for how tight or loose text is set. You might have better luck googling for that, such as this result.

这篇关于PHP使用imagettftext()和imagefttext()函数更新字距调整问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆