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

Font style matching is inconsistent

    XMLWordPrintable

Details

    Description

      styleName was added in Qt 5.6.
      The docs state "If set, the font will be matched against style name instead of the font properties font.weight, font.bold and font.italic."
      This however doesn't seem like correct behavior. It should still respond to those attributes as well.

      Use the attached test application for reproducing the issue.

      The application sets

       
      font.family: "Roboto" 
      font.weight: Font.Light 
      

      And the font is not Font.Light.

      When set:

      font.styleName: "Light" 
      

      Then it all becomes light. However, any text with embedded bold in it no longer works ("this has embedded bold"), and any text with bold: true is not bold.

      Attachments

        1. FontTest.tar.gz
          292 kB
        2. IMG_0017.JPG
          IMG_0017.JPG
          3.41 MB
        3. main.qml
          2 kB
        4. Screen Shot 2016-02-22 at 11.29.53 AM.png
          Screen Shot 2016-02-22 at 11.29.53 AM.png
          64 kB
        5. Windows 10 screenshot.png
          Windows 10 screenshot.png
          110 kB

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              kileppal Kimmo Leppälä
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes