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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.2
    • Fix Version/s: None
    • Component/s: GUI: Font handling
    • Labels:
      None
    • Platform/s:
      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

            Assignee:
            esabraha Eskil Abrahamsen Blomfeldt
            Reporter:
            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