Page 1 of 1

Problem with precise font scaling

Posted: 2019-04-22T07:13:15-07:00
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?