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

QFontInfo weight()/style() don't match with styleName()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.14.2
    • GUI: Font handling
    • None
    • Linux/X11

    Description

      If I create a QFont and set a styleName(), the associated QFontInfo doesn't show the right values for weight()/style() and similar.

      Here's an example, the font used is "Noto Sans"

      qDebug() << font_info.weight() << font_info.style() << font_info.styleName() << font_info.bold() << font_info.italic();
      // output with "Bold Italic"
      // 50 QFont::StyleNormal "Bold Italic" false false
      // output with "Regular"
      // 50 QFont::StyleNormal "Regular" false false
      

      The font is rendered with bold/italic correctly but there is no way of telling from QFontInfo.

      Even using QRawFont gives the same results.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            glax Mattia Basaglia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes