Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.3.3
-
None
-
c5f4b5ee4e7ca1aea98f58490330babb0710232d
Description
In QFontComboBox, there are some code:
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