From 6f0d60a60a467865865c708926438a601fa6f675 Mon Sep 17 00:00:00 2001 From: Andreas Koch Date: Thu, 31 Oct 2024 08:54:14 +0100 Subject: [PATCH] [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 --- .../win32/org/eclipse/swt/internal/ScalingSWTFontRegistry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ScalingSWTFontRegistry.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ScalingSWTFontRegistry.java index 0fd4b9aec2e..b321fe367d4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ScalingSWTFontRegistry.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ScalingSWTFontRegistry.java @@ -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);