- QT_FONT_DPI if set
- Xft.dpi if set
- screen.size() / screen.physicalSize()
This will not produce correct results on X as X fakes the physicalSize by default.
This causes fonts to get rendered at 96dpi, even if the primary monitor has 192dpi, for instance.
As a result, it is never enough to just enable HiDPI scaling to get usable results on X11, you always have to specify the DPI manually.