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

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

      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.

        1. font-correct.png
          6 kB
          liang jian
        2. font-wrong.png
          5 kB
          liang jian
        3. qtbug47096.zip
          3.44 MB
          Friedemann Kleint
        4. test.ttf
          5.41 MB
          liang jian
        5. testWinFont.rar
          2 kB
          liang jian
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes