Sina Fathieh
Sina Fathieh

Reputation: 1725

pixel font size in imagettftext instead of point size

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 other function that I can use, or any way to convert pixels to points ?

Upvotes: 6

Views: 8446

Answers (2)

markashworth
markashworth

Reputation: 1169

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

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

Upvotes: 10

Related Questions