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

[qt-Windows] Fail to use application font file of simplified chinese when running in Chinese locale

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.5.0
    • GUI: Font handling
    • None
    • Windows 7 x64
      vs2010 sp1
    • 4f15449bc2584ad299569c86f707994dca76d733

    Description

      I can't use application simplified chinese font file under Windows. This is because after I add the font file using QFontDatabase::addApplicationFont(), the font family name returned by QFontDatabase::applicationFontFamilies() is an english name, but the internally registered font family name is a localized version name. It will fail to use the english name to access the font.
      The sample program to reproduce this issue is attached. Before run the program, copy the attached test.tff font file to D:/test.tff, then run the program and you can see the character is not rendered in the font family I choose.

      Attachments

        1. font-correct.png
          font-correct.png
          6 kB
        2. font-wrong.png
          font-wrong.png
          5 kB
        3. qtbug47096.zip
          3.44 MB
        4. test.ttf
          5.41 MB
        5. testWinFont.rar
          2 kB
        For Gerrit Dashboard: QTBUG-47096
        # Subject Branch Project Status CR V

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            jianliang79 liang jian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes