Skip to content

Commit 9b2903b

Browse files
committed
[win32] use fixed zoom for default system font
This commit addresses a regression that is caused by DPIUtil#getDeviceZoom not properly initialized yet, when created the first system font. Explicitly passing the target zoom to the Font prevent the issue.
1 parent f35ee7f commit 9b2903b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/DefaultSWTFontRegistry.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public Font getSystemFont(int zoom) {
4949
}
5050
if (hFont == 0) hFont = OS.GetStockObject (OS.DEFAULT_GUI_FONT);
5151
if (hFont == 0) hFont = OS.GetStockObject (OS.SYSTEM_FONT);
52-
Font font = Font.win32_new(device, hFont);
52+
Font font = Font.win32_new(device, hFont, zoom);
5353
registerFont(KEY_SYSTEM_FONTS, font);
5454
registerFont(font.getFontData()[0], font);
5555
return font;

0 commit comments

Comments
 (0)