Quote:
Originally Posted by frostschutz
Is it possible for fbink --truetype to return an error when there was not enough space to render the text completely? Or for this info to be included in --coordinates?
What I'm actually trying to do is determine an optimal font size to render text to a given rectangle. But I can't do it reliably if fbink won't tell me whether the text fit or not.
It would also be interesting to get feedback on the number of times fbink decided to wrap.
Or maybe I'm going about UI design the wrong way... and I should just hardcode it. ;-)
|
It should be possible.
From memory, there's a measurement pass to test fit, and truncate if necessary. Just a matter of getting that information to the caller. Same with the number of lines.
(It's been a while since I implemented this, then NiLuJe has made changes to the code since, so I'm a bit fuzzy on exactly what's possible...)