DzHTMLText
DzHTMLText copied to clipboard
Font.Size is wrong, in a per Monitor DPI environment
its quite good that your codes tries to utilizes Font.Size in points instead of Font.Height in pixels that lets expect to work with every DPI, but Delphi VCL TFont is a fool - this computes font.height from font.size with the DPI from Screen.PixelsPerInch of the current main monitor.
In my case the mainmonitor is a 4k @ 150%, and a secondary monitor ist 2k @ 100% - so if a form with your control is moved between these monitors the translation of font.Height contains the wrong result for every fs:## because the real text height is computed from Screen.PixelsPerInch instead of the controls FCurrentPPI.
I think due this problem EMBA uses mostly TFont.Height for everything - because they know, that size isn't working well?
So my Idea would be useing Height too - and translate fs:## to height useing FCurrentPPI from the Control.
Hello
Can you please test this new feature?
Available at: https://github.com/digao-dalpiaz/DzHTMLText/tree/font-dpi
I'm doing a new review on DPI support. VCL support is almost ready.
https://github.com/digao-dalpiaz/DzHTMLText/tree/dpi-support
Done! Available in next version