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

QFontMetrics elides text when shouldn't with some fonts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.5.0, 5.6.0, 5.7.0 Alpha
    • GUI: Text handling
    • None
    • Linux

    Description

      With some fonts, QFontMetrics::elidedText elides text even when passed width from QFontMetrics::width(QString).

      QFontMetrics::width(QString) returns the distance to where the next string should be drawn (from docs), so the passed text should fit into returned width without eliding.

      Affected fonts: Noto Sans
      Unaffected fonts: DejaVu Sans

      Attached is a sample program that shows the issue.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            nowrep David Rosca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes