Skip to content

Commit 096b0df

Browse files
committed
Revert usage of getZoom() when calculating TextExtent
This issue reverts the behavior of GC::textExtent to use the GC::getZoom() instead of the zoom from the font as this results in a regression. Fixes #2361
1 parent 13934ee commit 096b0df

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5805,7 +5805,7 @@ public Point textExtent (String string) {
58055805
* </ul>
58065806
*/
58075807
public Point textExtent (String string, int flags) {
5808-
return Win32DPIUtils.pixelToPoint(drawable, textExtentInPixels(string, flags), data.font.zoom);
5808+
return Win32DPIUtils.pixelToPoint(drawable, textExtentInPixels(string, flags), getZoom());
58095809
}
58105810

58115811
Point textExtentInPixels(String string, int flags) {

0 commit comments

Comments
 (0)