Search code examples
delphifiremonkeydelphi-xe6

Delphi XE6/Firemonkey - get the actual Text Height?


So far I have tested this one :

mainLabel.Canvas.TextHeight( 'TT' );

which returns 16.5 which is far from correct text height (it's actually about 30) on FireMonkey - Android/iOS.

  • How to get the actual Text Height under Firemonkey platform / Delphi XE6 ?

Solution

  • It sounds like you're using devices with high-resolution displays.

    Try multiplying the TextHeight by the Canvas.Scale property, and see if you get anything closer to what you expect.