You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Win32] Use exact selected font size from FontDialog
The FontDialog implementation creates a font handle based on the
selection in the dialog to extract information about the font size out
of that created font. Due to point/pixel conversion and roundings that
depend on the current DPI (affected by the primary monitor zoom), the
resulting font size selected differs from what the user has selected.
For example, when selecting a 10pt font, the result of the dialog will
contain a height of 9.75pt on a 100% monitor and of 10.2pt on a 125%
monitor.
At the same time, the dialog manages the logically selected size, i.e.,
in the given scenario the selected 10pt, which could be used instead.
This change replaces the complex and imprecise font height extraction
logic with a simple read of the actual value selected by the user.
0 commit comments