File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -214,13 +214,13 @@ public FontData[] getFontData() {
214214 LOGFONT logFont = new LOGFONT ();
215215 OS .GetObject (handle , LOGFONT .sizeof , logFont );
216216 float heightInPoints = device .computePoints (logFont , handle );
217- int primaryZoom = device .getDeviceZoom ( );
217+ int primaryZoom = DPIUtil . mapDPIToZoom ( device ._getDPIx () );
218218 float zoomFactor ;
219219 if (zoomLevel != primaryZoom ) {
220220 // as Device::computePoints will always return point on the basis of the
221221 // primary monitor zoom, a custom zoomFactor must be calculated if the font
222222 // is used for a different zoom level
223- zoomFactor = 1.0f * device . getDeviceZoom () / zoomLevel ;
223+ zoomFactor = 1.0f * primaryZoom / zoomLevel ;
224224 } else {
225225 zoomFactor = 1.0f ;
226226 }
@@ -309,7 +309,7 @@ private static int extractZoomLevel(Device device) {
309309 if (device == null ) {
310310 DPIUtil .getNativeDeviceZoom ();
311311 }
312- return device .getDeviceZoom ( );
312+ return DPIUtil . mapDPIToZoom ( device ._getDPIx () );
313313}
314314
315315/**
You can’t perform that action at this time.
0 commit comments