Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.5.3
-
None
-
Debian testing, FreeType 2.3.11, Fontconfig 2.8.0
Description
Qt does not honor the configured DPI when rendering text. This causes text to be rendered incorrectly on screens with non-square pixels, even when the system is correctly configured and QX11Info::appDpiX()/QX11Info::appDpiY() report the correct values.
The problem seems to be that the calls to FT_Set_Char_Size do not include the configured DPI of the screen. According to the FreeType documentation calls to FT_Set_Char_Size where both horizontal and vertical resolution values are zero, a value of 72 DPI will be used instead.
The attached patch uses qt_defaultDpiX()/qt_defaultDpiY() in all calls to FT_Set_Char_Size instead of zero. With the patch applied and my screen configured at 54x72 DPI text looks normal.