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

QRawFont::advancesForGlyphIndexes seems to ignore KernedAdvances

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.14.2
    • GUI: Font handling
    • None
    • Kubuntu 20.20, qt installed from system packages.
    • Linux/X11

    Description

      I've been trying to render text using QRawFont but it seems it doesn't actually handle kerning correctly.

       

      I'm calling

      advancesForGlyphIndexes(glyphs, QRawFont::UseDesignMetrics|QRawFont::KernedAdvances)
      

      The QRawFont being created from a QFont with family "Noto Sans", style "Bold", and point size 36.

      Attached some screenshots comparing to how a QTextDocument renders it (outline) vs the result from QRawFont (filled).

      The QRawFont result is kept the same but the QTextDocument is shown with kerning enabled and disabled.

      The one where kerning is disable matches perfectly, while the one with kerning enable is off.

       

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            glax Mattia Basaglia
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes