Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.15.2
-
None
-
-
421e7621f (dev), b62b6094d (6.7), e88c2a3b3 (tqtc/lts-6.5)
Description
When HiDPI is on, Qt forces to draw text using QWindowsFontEngineDirectWrite. If the text can be drawn using the glyph cache, QWindowsFontEngineDirectWrite::imageForGlyph() is called to render the glyph. But NoAntialias flag is ignored.
When using GDI font engine (HiDPI is off), NONANTIALIASED_QUALITY is set: https://github.com/qt/qtbase/blob/5.15.2/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp#L1800-L1801
When using DirectWrite font engine (HiDPI is on), there is no code to turn off antialiasing (DWRITE_RENDERING_MODE_ALIASED?): https://github.com/qt/qtbase/blob/5.15.2/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp#L196-L203
This only happens when drawing small texts with the glyph cache.