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

QFontMetrics font width problem

    XMLWordPrintable

Details

    Description

      On certain fonts like Arial with narrow characters (i, j, t, etc), QFontMetrics is returning a width (boundingRect) that is too short. For example, setting the font size to both 12 and 14 returns the same width. The 14 pt width should be longer, but it is not. When this width is used in OpenGL rendering of text., the text is being cutoff at 14pt, 18pt, 22pt, 28pt, 34pt, 40pt, 44pt because the returned width is too short. Problem is magnified when italics and boldness is applied. For comparison, Microsoft PowerPoint has unique widths for all these point sizes. This problem also happens for many fonts and at many point sizes.

       

      Attached is an example that shows the result of bounding rect for both 12 and 14 font sizes.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            misalmel Mika Salmela
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes