Details
-
Bug
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
5.4.0
-
None
-
Linux, 64 bit Qt 5.4.0 (Arch package)
Description
Currently in createFontCustomPlatformData() in FontCustomPlatformDataQt.cpp the QRawFont is created with QFont::PreferDefaultHinting. This is hardcoded with no way to change it.
This causes very poor letter spacing at some font sizes for some fonts (depending on how much hinting information the font has). See attached screenshot for text rendered in DejaVu Sans at 14px and 15px. Note the incorrect spacing around the u character at 15px (the first word)
This is a particular problem when using QWebView to render to a non-screen device, such as a PDF file, where there really should be no hinting. Hinting is the responsibility of the PDF viewing app, not the PDF creating app.
There should be some way to change this setting to no hinting. Ideally via QWebSettings, but I'd settle for even a environment variable.
I realize that on windows with the GDI font backend hinting is unavoidable, but hopefully at some point in the future, Qt will switch to either DirectWrite or FreeType on windows.
I know that on linux hinting can be turned off via fontconfig, but that is global (affects all applications).
So it would be great to have an option to turn off hinting on linux and windows.
Thank You.