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

QFontMetrics returns wrong boundingRect and width

    XMLWordPrintable

Details

    • 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. qtbug51024.zip
          1 kB
        3. windows.png
          windows.png
          19 kB

        Issue Links

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              poikelin Joni Poikelin
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: