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

Windows font layout: Segoe UI Emoji inaccurate bounding box and rendering

    XMLWordPrintable

Details

    • Windows
    • 318a991907b6c08f52786160bafea1e30d3ad9bd (qt/qtbase/5.15)

    Description

      This was tested on Windows 10 default configuration with no dpi scaling. 

      Legend: 1. Arial - Ascii text; 2. Segoe UI Emoji - Ascii text; 3. Arial - Unicode; 4. Segoe UI Emoji - Unicode
      See main.qml

      Issues: 

      Rendering:

      • The font "Segoe UI Emoji" is drawn a little too much to the right and down. This causes it to be drawn outside of its own Item. With clipping enabled, about one or two pixels are cut on the bottom. This offset was mentioned in the comments of QTBUG-55096. On Stackoverflow there was some discussion: stackoverflow.com
      • Arial fallback is drawn only in B/W. See QTBUG-68763.
      • Arial is not using ligatures correctly when falling back to Segoe UI Emoji

       Usability:

      • Even with RichText html tags or Text.verticalAlignment, there is no way to vertically align the unicode characters such as emojis to the top or center of the line. They are always aligned to the bottom.

      Metrics:

      • Alignment of tightBoundingRect of Arial seems alright, with Segoe UI Emoji it's off a little (because of rendering). The issue gets worse the smaller the font is.
      • childrenRect and tightBoundingRect  of the Arial font both report too much width.

      Documentation:

      • There is next to no documentation on FontMetrics boundingRect and tightBoundingRect. I combined the x and y values to make them align with the Arial/Ascii example, but separately they don't make any sense, and there is no docs what they represent.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            mr.greywater mr.greywater
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes