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

QWindowsFontEngineDirectWrite ignores QFont::NoAntialias flag

    XMLWordPrintable

Details

    • Windows
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        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 are no open Gerrit changes