Skip to content

Commit 6f0d60a

Browse files
committed
[win32] possible wrong zoom set for system font
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
1 parent d54cfca commit 6f0d60a

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/ScalingSWTFontRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private ScaledFontContainer getOrCreateBaseSystemFontContainer(Device device) {
9292
if (systemFontContainer == null) {
9393
int targetZoom = DPIUtil.mapDPIToZoom(device.getDPI().x);
9494
long systemFontHandle = createSystemFont(targetZoom);
95-
Font systemFont = Font.win32_new(device, systemFontHandle);
95+
Font systemFont = Font.win32_new(device, systemFontHandle, targetZoom);
9696
systemFontContainer = new ScaledFontContainer(systemFont, targetZoom);
9797
fontHandleMap.put(systemFont.handle, systemFontContainer);
9898
fontKeyMap.put(KEY_SYSTEM_FONTS, systemFontContainer);

0 commit comments

Comments
 (0)