You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit ensures Font#extractZoom is device independent. The previous
logic didn't provide any advantages anymore after the conversion between
points and pixels was changed for Fonts. By using DPIUtil#getNativeZoom
the most probable value for the zoom of a new font a chosen.
if (name == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
192
-
this.zoom = extractZoom(this.device);
192
+
this.zoom = extractZoom(device);
193
193
init(newFontData (name, height, style));
194
194
this.fontHeight = height;
195
195
init();
@@ -296,9 +296,9 @@ public String toString () {
296
296
297
297
privatestaticintextractZoom(Devicedevice) {
298
298
if (device == null) {
299
-
returnDPIUtil.getNativeDeviceZoom();
299
+
System.out.println ("***WARNING: Initializing a font with a null device will use the default device and can lead to errors when this font is used with another device."); //$NON-NLS-1$
0 commit comments