阅读背景:

使用PHP GD计算文本宽度

来源:互联网 

I'm simply trying to get the width of a dynamic line of text for addition to an image generated with GD PHP. I'm a little unsure how though. I know how to load a font using imageloadfont(), but can I use a .ttf file? I want to know the width of text using size 12 arial font. When I try to use my ttf file I get the error "Error reading font, invalid font header." If I need a .gdf file, where can I find a font size 12 gdf file? Here's my code:I'm simply trying to get the width of a dynamic




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: