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

Antialiasing seems not working when rendering fonts via QPainter on a QQuickPaintedItem using native font engine on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9
    • GUI: Font handling
    • None
    • Windows

    Description

      Our application renders 2D graphics using QPainter on a QQuickPaintedItem.

      Music notation makes for an interesting case because it uses a combination of elements drawn from primitive commands (such as staff lines, stems, beams, slurs, etc.) with elements drawn from fonts (such as note heads, rests, clef symbols, and obviously text).

      On the primitively drawn elements, antialiasing works fine. This can be seen on the curved lines of the slurs, or the thin diagonal line of the stem slash on the grace notes (which would be otherwise all jagged). This tells me that there isn't any fundamental problem with the antialising.

      With the font-based elements, however, things change depending on whether we set the font engine to Freetype or native. In particular, the native engine looks like the antialiasing was just turned off (all the curved lines are jagged, see for instance the note heads, the clefs and the fermata symbols). The quality of the rendered text is also much worse in the native engine. I hope the screenshots are high res enough to see it.

      It's possible that this is not a Qt bug and it's just the Windows' font engine being inferior. But it's also oddly specific to QPainter on QQuickPaintedItem, because native QML text renders much better, even if still using the native engine.

      This, by the way, is the reason why we need to stick to FreeType rendering in our app, which led us to the other issue I've reported about missing font families.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            michelespagnolo Michele Spagnolo
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes