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

Windows: Make QFontMetrics(F)::ascent() and descent() consistent with other platforms

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 6.0
    • 6.0
    • GUI: Font handling
    • None
    • Windows
    • f761ad3cd9ad1252f24b76ae413298dc7bed8af3

    Description

      QFontMetrics(F)::ascent() and descent() on Windows currently returns the values retrieved by the system, which is not the actual typographic ascent/descent of the font, but the so-called winAscent/winDescent, which is used to calculate the maximum possible height of a line of text, not the typographic bounds.

      This means (needs confirmation) that when we lay out several text lines on Windows, the distance between them may be larger than on macOS or Freetype, and it will be inconsistent with how the font was actually designed.

      To make this more consistent in Qt 6, we will make the ascent/descent on Windows return the same as on the other platforms, i.e. the typographic metrics from the font data.

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              esabraha Eskil Abrahamsen Blomfeldt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes