Skip to content

Commit d36f616

Browse files
akoch-yattaHeikoKlare
authored andcommitted
[win32] Refetch GC font on demand
This commit that the GC always uses the font with the correct zoom in the windows implementation.
1 parent 649bb49 commit d36f616

File tree

1 file changed

+2
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics

1 file changed

+2
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3947,9 +3947,9 @@ void init(Drawable drawable, GCData data, long hDC) {
39473947
if (data.nativeZoom == 0) {
39483948
data.nativeZoom = extractZoom(hDC);
39493949
}
3950-
Font font = data.font;
3951-
if (font != null) {
3950+
if (data.font != null) {
39523951
data.state &= ~FONT;
3952+
data.font = Font.win32_new(data.font, data.nativeZoom);
39533953
} else {
39543954
data.font = SWTFontProvider.getFont(device, OS.GetCurrentObject(hDC, OS.OBJ_FONT), data.nativeZoom);
39553955
}

0 commit comments

Comments
 (0)