Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.0
-
None
-
Windows 7
-
731f2a179b2056509582ac66641cdd3c846ac9dc
Description
In my application, I noticed that DirectWrite was not always being used in my QTextDocument despite the fact that I was setting the hinting preference of my QFont to QFont::PreferNoHinting. After some investigation it turned out that the hinting preference is not preserved if you set the font in a document by calling QTextCharFormat::setFont and then applying this format to the document.
The missing code seems to be in QTextCharFormat::setFont, which needs to call setFontHintingPreference with the value from the font passed in.