开发者

pixel font size in imagettftext instead of point size

开发者 https://www.devze.com 2023-01-28 04:56 出处:网络
I\'m trying to use imagettftext, but apparently it uses point size in GD2, but all of my sizes are in pixels, is there any 开发者_如何学JAVAother function that I can use, or any way to convert pixels

I'm trying to use imagettftext, but apparently it uses point size in GD2, but all of my sizes are in pixels, is there any 开发者_如何学JAVAother function that I can use, or any way to convert pixels to points ?


If you're super-lazy, then this might work as an approximation:

$fontsizeinPT = ($fontsizeinPX*3)/4;


See http://reeddesign.co.uk/test/points-pixels.html

0

精彩评论

暂无评论...
验证码 换一张
取 消