Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.6, 6.0.0
-
None
Description
This has been bothering me ever since we added high-dpi scaling, but maybe Qt 6 is a good time to tweak the appearance?
The underscore seems to be 2px instead of 1px high if scaling factor > 1, when I try to disable scaling by setting QT_ENABLE_HIGHDPI_SCALING=0. My xft_dpi is set to 120 (just a matter of preference, because I don't mind having smaller text on a 4K screen in GTK applications for example), and physical DPI is 160, so if I don't set QT_ENABLE_HIGHDPI_SCALING, then QHighDpiScaling::rawScaleFactor() is 1.25, which actually seems sensible in practice. It's just not clear to me why the underscore scaling is not very well in sync with the text scaling.
Screens: 3, High DPI scaling: inactive
# 0 "DisplayPort-0" Depth: 24 Primary: yes
Manufacturer: Samsung Electric Company
Model: U28E850-
Serial number: HTPJC00213-
Geometry: 3840x2160+3840+0 Available: 3840x2160+3840+0
Virtual geometry: 8880x2160+0+0 Available: 8880x2160+0+0
3 virtual siblings
Physical size: 607x345 mm Refresh: 59.9966 Hz Power state: 0
Physical DPI: 160.685,159.026 Logical DPI: 120,120 Subpixel_None
DevicePixelRatio: 1
Primary orientation: 2 Orientation: 2 Native orientation: 0
The underscores are also solid black pixels with no AA. The result is it looks too "bold" and encroaches on the rendering of the characters themselves. It also looks too high vertically; perhaps it should align with the descenders, or midway between the baseline and the bottom of the descender; but it looks like instead perhaps it always "grows" upwards whenever the logic decides that it should be 2px high instead of 1px. Perhaps AA should result in it being less than fully black, unless the scaling factor is actually 2.
Whereas with no env vars set, the underscore is 1px high on this setup, and that looks better.
Qt Creator has the ugly underscores with no env vars set, whether its "enable high-dpi" setting is turned on or off. But my current version of that is built with 5.15.2.