I am a user of Double Commander which uses TDrawGrid as the file list and TPageControl to switch between multiple lists. I use it under Windows 11 23H2.
When I tried to change the font of the TPageControl, I found the font height of the TDrawGrid is slightly larger than expected under a high DPI display. With a display with 200% scale (192 DPI), when Font.Size is 8, the expected height is -21 (8*192/72=21.33), but the actual value is -22. With a display with 350% scale (336 DPI), the expected height is -37 (8*336/72=37.33), but the actual value is -39.
This only happens when DesignTimePPI is not specified.
I can confirm that it is not a bug of Double Command but a bug of LCL. I have created a minimal project to reproduce the problem. Anyone please give me some hint of how and where the Height value of the font is calculated. I have checked grids.pas and font.inc but I can't see what is wrong. Thanks in advance.