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

FontLoader returns preferred family name instead of font family name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.6, 5.11.0
    • Fix Version/s: None
    • Component/s: Quick: Other
    • Environment:
      Qt 5.9.6 and Qt 5.11.0 built with -system-freetype (Freetype: 2.9) on latest Gentoo Linux ~amd64.

      Description

      FontLoader {
          id: fontNormal
          source: "SourceSansPro-Light.ttf"
      }
      

      fontNormal.name is set to 'Source Sans Pro' which is the preferred name of the ttf.

      FontLoader {
          id: fontItaric
          source: "SourceSansPro-Light-Itaric.ttf"
      }
      

      fontItalic.name is also set to 'Source Sans Pro' which is the preferred name of the ttf.

       

      Text { font.family: fontNormal.name }  // will be italic one

      Then we can not apply fontNormal.name and fontItalic.name as they are because they are the same string and the font loaded at last will be applied in this case.

      Please find the example attached to reproduce the issue. Fonts are also in it.

      What I expect is that FontLoader sets its family name to the name property.

      • Source Sans Pro Light
      • Source Sans Pro Light Itaric

        Attachments

        1. qtbug68829.zip
          262 kB
        2. qtbug68829_qtdeclarative_diag.diff
          1 kB
        3. qtbug68829_qtbase_diag.diff
          3 kB
        4. qtbug68829_log.txt
          3 kB
        5. fontloader.tar.gz
          259 kB

          Issue Links

          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:
                tasuku.suzuki Tasuku Suzuki
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes