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

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to