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

QRawFont::advancesForGlyphIndexes seems to ignore KernedAdvances

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.2
    • Fix Version/s: None
    • Component/s: GUI: Font handling
    • Labels:
      None
    • Environment:
      Kubuntu 20.20, qt installed from system packages.
    • Platform/s:
      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

            Assignee:
            esabraha Eskil Abrahamsen Blomfeldt
            Reporter:
            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