Problem with precise font scaling

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
KroloDevo
Posts: 1
Joined: 2019-04-22T06:54:31-07:00
Authentication code: 1152

Problem with precise font scaling

Post by KroloDevo »

Hi,

I'm working now on program in which I manipulate on strings.
If width of some string is greater than x, then reduces font-size to get exactly x width.
It seems that setFontSize func doesn't support floating point number argument (it rounds it to integer). It's weird, because documentation says that this function receives float argument. When I need to set font-size to e.g. 11.6px, it rounds it to 12px.
There is some way to set float font-size? Or maybe this happens cause I use custom font?
Post Reply