1
votes

In a Delphi FMX applicatoin, why are font sizes off by a factor of 1.35 (too small). For example, if I put a TMemo on a FMX form and change the TextSettings.font.size to 72, the spacing between the lines should be exactly 1" (as the are in VCL). But to get the same spacing I need change memo scaling to 1.35 of make the font 97.2 points. Oddly the fonts are also the wrong size in the dialog to select a font. Is this a bug or do I have something set wrong?

I do have a large monitor but not scaled the fonts (Windows 10) and everything reports that it is seeing the default 96 dpi.

Target in currently Win32 (I have not tried it on OSX yet)

1

1 Answers

2
votes

As per the Embarcadero web site:

Font sizes in FMX are expressed in device-independent pixels (DIPs), 96 per logical inch. Font sizes in VCL are expressed in points, 72 per logical inch. Therefore, text using the same Font.Size is smaller in FireMonkey.

As such, the ratio is 96/72 = 1.3333.

Edit: Came across this very nice explanation on the MSDN web site about Dots Per Inch (DPI) vs Device Independent Pixels (DIP). Relevant to why FMX uses DIP.