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

FontLoader returns preferred family name instead of font family name



    • Type: Bug
    • Status: In Progress
    • 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.


      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


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

          Issue Links

          For Gerrit Dashboard: QTBUG-68829
          # Subject Branch Project Status CR V



              • Assignee:
                esabraha Eskil Abrahamsen Blomfeldt
                tasuku.suzuki Tasuku Suzuki
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created:

                  Gerrit Reviews

                  There is 1 open Gerrit change