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

[REG 6.2.2->6.2.3/6.3.0] Incorrect bounding rect calculations on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P1: Critical
    • None
    • 6.2.3, 6.3.0 Beta1
    • GUI: Font handling
    • None
    • macOS 12.1
    • macOS

    Description

      Qt 6.2.3 and 6.3.0 Alpha calculate bounding rects improperly for a lot of fonts on macOS. This was not the case in 6.2.2 and it severely breaks my application when the user selects those fonts. Screenshots attached.

      The fonts used in the example are all fonts that come preinstalled with macOS.


       Here's what happens in the attached screenshot:

      1. For each font, the bounding rect is calculated using QFontMetricsF::boundingRect(const QString &text)
      2. The bounding rect is drawn
      3. The baseline of the text is drawn (by definition of the bounding rect, this is the line at y=0)
      4. The text is drawn

      On Qt 6.2.3 and Qt 6.3.0 Alpha, these fonts do not align with the bounding rect.

      Attachments

        1. 6.2.2.png
          6.2.2.png
          1009 kB
        2. 6.2.3.png
          6.2.3.png
          1006 kB
        3. 6.2.3 with FreeType.png
          6.2.3 with FreeType.png
          1.08 MB
        4. Academy Engraved LET in Apple Pages.png
          Academy Engraved LET in Apple Pages.png
          19 kB
        5. qtbug-100298.cpp
          3 kB
        6. Savoye LET in Apple Pages.png
          Savoye LET in Apple Pages.png
          16 kB

        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
              nikwen Niklas Wenzel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes