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] Cache font height to prevent inconsistency
This commit adapts a limitation of handling fonts in the win32
implementation. When a font is initialized with FontData the height in
points of it and the desired target zoom will be used to calculate the
font height in pixels. When the FontData of an existing font is retrieved
the Logfont data from the OS together with the font zoom are used to
recalculate the original font height. As the conversion to pixels
involved rounding, the reversed calculation will result in a different
value than was used on creation time. With monitor-specific scaling
a font for a different zoom will be calculated on the basis of the
FontData of an existing base font. This can lead to font heights in
pixels that differ from the "correct" value. To solve this limitation
each font stores its original font height in points to recreate the it
when Font::getFontData is called.
0 commit comments