Skip to content

Commit

Permalink
[win32] possible wrong zoom set for system font
Browse files Browse the repository at this point in the history
This commit adapts the initialization of a new base system font in the ScalingSWTFontRegistry to ensure the correct zoom is set at initialization.

contributes to #62 and #127
  • Loading branch information
akoch-yatta committed Oct 31, 2024
1 parent d54cfca commit 6f0d60a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private ScaledFontContainer getOrCreateBaseSystemFontContainer(Device device) {
if (systemFontContainer == null) {
int targetZoom = DPIUtil.mapDPIToZoom(device.getDPI().x);
long systemFontHandle = createSystemFont(targetZoom);
Font systemFont = Font.win32_new(device, systemFontHandle);
Font systemFont = Font.win32_new(device, systemFontHandle, targetZoom);
systemFontContainer = new ScaledFontContainer(systemFont, targetZoom);
fontHandleMap.put(systemFont.handle, systemFontContainer);
fontKeyMap.put(KEY_SYSTEM_FONTS, systemFontContainer);
Expand Down

0 comments on commit 6f0d60a

Please sign in to comment.