[Lazarus] PDF generator: please test

Ondrej Pokorny lazarus at kluug.net
Thu Apr 14 01:04:03 CEST 2016


You've got a bug in the font height functions. They must not be scaled 
with ToNatural.

Try e.g. the Tahoma font from Windows or any other font where 
FHead.UnitsPerEm<>1000. You'll see wrong results.

Your example works because FHead.UnitsPerEm is 1000 for your version of 
FreeSans. If you use an old FreeSans where UnitsPerEm is 2048, you get 
wrong box height.

I needed about 2 hours to find it :(

See http://mantis.freepascal.org/view.php?id=30008

Ondrej




More information about the Lazarus mailing list