Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.9.1
-
None
-
Debian sid, packaged Qt 5.9.1, plain Xorg session with Awesome WM, no desktop environment. `xrandr` output for the mixed-DPI case is attached. In single-display mode, only eDP-1 is connected.
Description
I have a laptop with a HiDPI built-in display (15" 3200x1800, 235 physical DPI), which I use both standalone and in a mixed-DPI environment (with one or two other monitors with 96 physical DPI), and I am trying to configure my system in such a way that it works correctly out of the box in both configuration, even when dynamically (i.e. without restarting X11) switching between the two.
I have found that `QT_AUTO_SCREEN_SCALE_FACTOR=1` or the equivalent `Application::setAttribute(Qt::AA_EnableHighDpiScaling, true);` takes me a long way towards this, with the exception of font rendering.
Specifically, with HiDPI support enabled (either via the environment variable or via the setAttribute above), the situation is the following:
- when in a mixed DPI configuration, I get the correct (and expected) behavior with font DPI configured to 96 (e.g. by `QT_FONT_DPI=96` or `xrandr -
dpi 96`, which configures X11 to report a DPI of 96 via the core protocol): font sizing is consistent between the monitors, and normally sized on both the HiDPI and LoDPI monitors (see otter-autoscale-mixed-96* attachments);
- when only the laptop display is active (i.e. single, HiDPI monitor), then the correct behavior is achieved with the font DPI configured to 192 (again, either by `QT_FONT_DPI` or by configuring X11 to report 192 DPI via the core protocol) (see otter-autoscale-hionly-192);
Using a font DPI of 192 in the mixed case gives too large fonts (consistently across Hi and LoDPI monitors, see otter-autoscale-mixed-192-* attachments), while using a font DPI of 96 in the single-display case gives too small fonts (see otter-autoscale-hionly-96).