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

QFontMetrics returns wrong boundingRect and width

    XMLWordPrintable

    Details

    • Commits:
      b8c1efcb887a2aa313fd843aa16a5be84d4189e6

      Description

      At least on Windows 10, functions QFontMetrics::width(), QFontMetrics::boundingRect() and QFontMetrics::tightBoundingRect() return rectangle that is too small or way too large for the font.

      On Linux boundingRect() and tightBoundingRect() return a size that is smaller than the text that would be drawn.

      In Qt 5.6 on Windows with native font engine, tightBoundingRect() is even worse than in Qt 5.5.1 where even height is unreasonably huge.

        Attachments

        1. linux.png
          linux.png
          8 kB
        2. windows.png
          windows.png
          19 kB
        3. qtbug51024.zip
          1 kB

          Issue Links

          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:
              poikelin Joni Poikelin
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes