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

Windows: QFontInfo() returns wrong font weight for Arial Black

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.14.0 Alpha
    • GUI: Font handling
    • None
    • Windows

      Run the following code on Windows:

          QFont lQfont_ArialBlk;
          lQfont_ArialBlk.setFamily("Arial Black");
          lQfont_ArialBlk.setWeight(QFont::Black);
          qDebug() << QFontInfo(lQfont_ArialBlk).family() << QFontInfo(lQfont_ArialBlk).weight();
      

      It will print out "Arial Black" and 50. Setting the weight on the QFont query makes no difference.

      The actual weight of the Arial Black font is 87.

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

            esabraha Eskil Abrahamsen Blomfeldt
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes