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

Could QFontComboBox be locale sensitive?

    XMLWordPrintable

Details

    • c5f4b5ee4e7ca1aea98f58490330babb0710232d

    Description

      In QFontComboBox, there are some code:

      src/gui/widgets/qfontcombobox.cpp
      static QFontDatabase::WritingSystem writingSystemForFont(const QFont &font, 
      bool *hasLatin)
          if (writingSystems.count() <= 5
              && writingSystems.last() >= QFontDatabase::SimplifiedChinese
              && writingSystems.last() <= QFontDatabase::Korean)
              system = writingSystems.last();
      

      Many fonts for CJK areas cover more than one languages. For example, FZSongTi(in SUSE) covers Simplified Chinese and Traditional Chinese, WenQuanYi Zen Hei covers Simplified Chinese, Traditional Chinese, Japanese and Korean.

      The result of above code is display Traditional Chinese example text for FZSongTi, and Korean example text for WenQuanYi Zen Hei, doesn't care about the user's locale.

      This confuese the users, is not good result, and the users consider it's a bug of our Qt.

      I think the best way for these kind of CKJ fonts, QFontComboBox should be locale sensitive.

      Based on qlocale_data_p.h,the map of Language/Locale -> WritingSystem should be:
      Japanese/Japan -> Japanese
      Korean/RepublicOfKorea -> Korean
      Chinese/China -> Simplified Chinese
      Chinese/HongKong -> Traditional Chines
      Chinese/Macau -> Traditional Chines
      Chinese/Singapore -> Simplified Chinese
      Chinese/Taiwan -> Traditional Chines

      For fonts, FZSongTi is a commercial one, you can test it on openSUSE/SUSE.WenQuanYi Zen Hei is GPL one, if on suse, you can go to http://software.opensuse.org/search and search "ttf-wqy-zenhei". Or you can find it from its website,
      http://downloads.sourceforge.net/wqy/wqy-zenhei-0.2.15-1.tar.gz?use_mirror=osdn

      Attachments

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

        Activity

          People

            liaqi Liang Qi
            liaqi Liang Qi
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes