Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97645

QWindowsFontEngineDirectWrite ignores QFont::NoAntialias flag

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.7.1, 6.8.0 FF
    • 5.15.2
    • GUI: Font handling
    • None
    • Windows
    • 421e7621f (dev), b62b6094d (6.7)

    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.

      Attachments

        For Gerrit Dashboard: QTBUG-97645
        # Subject Branch Project Status CR V

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            mingxiang Mingxiang Xu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change