0
votes

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 ?
1
How different is it? Chances are it includes the internal leading at least, which will give you some space above the flat bar at the top of the T. Can you give details (this goes for any good question) about what is different between what you expect and what you got, please? - David
Your edit doesn't help us answer the question. 16.5 (pixels?) is a perfectly plausible text height for a normal UI-size font. How is what you get different from what you expect? Please show a screenshot or something - anything that will help is figure out what on earth is wrong about "16.5" and that will show us what it is you want instead. Second, did you investigate the internal leading, and does removing that give the answer you want - whatever that is? - David
The actual height of the text is about 30 pixes while it still continue to returning me 16.5 pixels. ( I am sorry I didnt included it on the main ). - Yordan Yanakiev

1 Answers

2
votes

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.