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

Qt fonts don't work right

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.9, 5.12.2, 5.12.7, 5.14.1, 5.15.0 Alpha
    • Fix Version/s: None
    • Component/s: GUI: Text handling
    • Labels:
      None
    • Platform/s:
      Linux/X11, Windows

      Description

      Code:

      QFont font("Arial",12);
      QString txt = "Yazı";

      qDebug()<<"################";

      QFontMetrics fm(font);
      width = fm.width(txt);
      qDebug()<<"Normal Width: "<<width;

      font.setBold(true);

      QFontMetrics fm2(font);
      width = fm2.width(txt);
      qDebug()<<"Bold Width: "<<width;

      qDebug()<<"################";

      Output:

      ################
      Normal Width: 26
      Bold Width: 25
      ################

       

      See comment https://bugreports.qt.io/browse/QTBUG-76908?focusedCommentId=498035&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-498035 for an example that reproduces the issue.

        Attachments

        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:
            mehmetkarlik Mehmet Karlık
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes