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
{{ message }}
Repository navigation
[Win32] Wrong line height in StyledText when deviceZoom > nativeZoom #2405
Describe the bug
When using an environment and swt.autoScale configuration that leads to an auto-scaled device zoom that is larger than native zoom, the line heights in a StyledText will become too large (scaled according to device zoom instead of native zoom).
To Reproduce
The behaviore can probably be reproduced with CustomControlExample's StyledText tab, but it's most simple to do with an Eclipse SDK:
Set primary monitor zoom to 175%
Start an Eclipse SDK with disabled monitor-specific scaling (e.g., swt.autoScale.updateOnRuntime=false)
Open any StyledText such as a Java code editor
You will see that line height are slightly to high.
To compare with the intended behavior, you can either enabled monitor-specific scaling or start the application with Dswt.fontRegistry=legacy, as the previously used fixed-zoom font registry worked around that issue.
Expected behavior
The line height to always be correct according to the font size / native zoom.
Screenshots
The left shows a StyledText with the reproduction scenario (175% primary monitor zoom, monitor-specific scaling disabled), the right shows the same StyledText with -Dswt.fontRegistry=legacy leading to the expected behavior:
Environment:
Select the platform(s) on which the behavior is seen:
Activity
[Win32] Fix wrong line height in StyledText eclipse-platform#2405
[Win32] Fix wrong line height in StyledText #2405