-
Couldn't load subscription status.
- Fork 184
Description
After the following PR to use ScalingSWTFontRegistry, a regression was introduced where the font sizes of the line number ruler (for int200) differ:
Previously, in LegacySWTFontRegistry (DefaultSWTFontRegistry), fonts were always created using the constructor Font(Device, FontData). However, in ScalingSWTFontRegistry, fonts are now created using the Font(Device, FontData, zoom) constructor.
When fonts are created using Font(Device, FontData), they implicitly use DPIUtil.getNativeDeviceZoom() for scaling. On the other hand, fonts created via the new constructor use the zoom value explicitly passed to SWTFontProvider.getFontHandle(font, zoom).
For example, with LegacySWTFontRegistry, the LineNumberRuler had the same font size as the text editor.
However, with ScalingSWTFontRegistry, the sizes may now differ due to the zoom being explicitly passed on font creation.
| (LegacySWTFontRegistry) | (ScalingSWTFontRegistry) |
|---|---|
![]() |
![]() |
Steps to reproduce
Start eclipse On monitor with 225% zoom with
-Dswt.autoScale.updateOnRuntime=false
-Dswt.autoScale=integer200

