Mike FABIAN <mfabian@suse.de> さんは書きました:
Florian Ehinger <florian@kflog.org> さんは書きました:
This is not working on my system. I tried it several times with different fonts.
In my qtrc I set up the font substitution [Font Substitutions] Sans Serif=AR PL SungtiL GB^e Verdana=AR PL New Sung^e
I tried both to set up "Sans Serif" and "Verdana" as the default font in konqueror. I get still the same result, for the chinese Characters only a bitmap font is used which will not be scaled and looks quite ugly -> see attached screenshot.
You are right, this doesn't work anymore. As this used to work, I have opened the following bug report:
This bug has been fixed now. Please try the updated qt3 packages in http://software.opensuse.org/download/M17N/openSUSE_10.2
Sans Serif=AR PL SungtiL GB^e
Font substitutions for aliases like "Sans Serif" will not work, font substitutions only work for real fonts.
Verdana=AR PL New Sung^e
This one should work now. Note that some Chinese fonts have translated family names and the name listed first by fontconfig depends on the locale used. For example: mfabian@magellan:~$ LC_CTYPE=en_US.UTF-8 fc-list "AR PL SungtiL GB" AR PL SungtiL GB,文鼎PL简报宋:style=Regular mfabian@magellan:~$ LC_CTYPE=zh_CN.UTF-8 fc-list "AR PL SungtiL GB" 文鼎PL简报宋,AR PL SungtiL GB:style=Regular mfabian@magellan:~$ LC_CTYPE=en_US.UTF-8 fc-list "FZSongTi" FZSongTi,方正宋体:style=Regular mfabian@magellan:~$ LC_CTYPE=zh_CN.UTF-8 fc-list "FZSongTi" 方正宋体,FZSongTi:style=Regular mfabian@magellan:~$ However, Qt3 only knows one name of such a font and which one depends on the locale! I.e. if LC_CTYPE=en_US.UTF-8, qt3 will only find "FZSongTi", as far as qt3 is concerned "方正宋体" does not exist if LC_CTYPE=en_US.UTF-8. If LC_CTYPE=zh_CN.UTF-8, the situation is reversed, qt3 will then only find "方正宋体" and will not now about "FZSongTi". Therefore, to make the font substitutions work independent of the locale, you should add all the possible names for a font to the font substitutions, for example write Verdana=FZSongTi^e方正宋体^e instead of just Verdana=FZSongTi^e While trying to fix the problem with the font substitutions reported in http://bugzilla.novell.com/show_bug.cgi?id=244579, several other font bugs in qt3 were fixed. For example, even when LC_CTYPE=zh_TW.UTF-8, qt3 would sometimes refuse to use the font matched by fontconfig for that locale. The default fontconfig setup on openSUSE 10.2 uses CMEXSong for traditional Chinese (if this font is installed of course), i.e.: mfabian@magellan:~$ LC_CTYPE=zh_TW.UTF-8 fc-match sans cmexsong.ttf: "CMEXSong" "Regular" mfabian@magellan:~$ But due to bugs in qt3, this font was not used by qt3 for zh_TW.UTF-8 locale if "Sans Serif" was selected in qt3. This is fixed now. You wrote in another mail: Florian Ehinger> the problem is, that I am normally using the de Florian Ehinger> locale, since I am German. I stayed half a year in Florian Ehinger> China and still studying Chinese. Florian Ehinger> I have installed the founder fonts, but they are not Florian Ehinger> used by KDE normally. Florian Ehinger> I do not want to set up the founder font as the Florian Ehinger> default kde font since for normal latin characters it Florian Ehinger> is not so nice. Florian Ehinger> I just want to set up the font which is used if KDE Florian Ehinger> (or QT) is not able to find the characters in the Florian Ehinger> default font. With the fixed qt3 packages, there are two ways to achieve what you want. For both ways first select your favorite Fonts for German in KDE (i.e. "Verdana" instead of "Sans Serif", ...). Don't use the aliases "Sans Serif", "Serif", and "Monospace"! Then: 1) use font substitutions for Verdana in qtrc as described above 2) don't use the font substitutions but set LC_CTYPE=zh_CN.UTF-8 (for simplified Chinese) or LC_CTYPE=zh_TW.UTF-8 (for traditional Chinese). Keep LANG=de_DE.UTF-8 to keep the rest of your locale settings German. For example: mfabian@magellan:~$ export LANG=de_DE.UTF-8 mfabian@magellan:~$ export LC_CTYPE=zh_CN.UTF-8 mfabian@magellan:~$ locale LANG=de_DE.UTF-8 LC_CTYPE=zh_CN.UTF-8 LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL= mfabian@magellan:~$ Setting LC_CTYPE=zh_CN.UTF-8 has no disadvantages for your German desktop, the only effect it has is that the preferred fonts will be simplified Chinese, i.e. aliases like "Sans Serif", "Serif", and "Monospace" will expand to simplified Chinese fonts. That means, if you select "Verdana" in the KDE control centre and Chinese glyphs need to be displayed, and no font substitutions are set up in qtrc, qt3 will fall back to the font given by "fc-match sans" which will be a good Chinese font if LC_CTYPE=zh_CN.UTF-8. If you want to change which Chinese fonts are matched by fontconfig for the generic aliases "serif", "sans-serif", and "monospace", you can add rules as follows to your ~/.fonts.conf: <alias> <family>serif</family> <prefer> <family>DejaVu Serif</family> <family>CMEXSong</family> <family>FZSongTi</family> <family>FZMingTiB</family> </prefer> </alias> <alias> <family>sans-serif</family> <prefer> <family>DejaVu Serif</family> <family>CMEXSong</family> <family>FZSongTi</family> <family>FZMingTiB</family> </prefer> </alias> <alias> <family>monospace</family> <prefer> <family>DejaVu Sans Mono</family> <family>CMEXSong</family> <family>FZSongTi</family> <family>FZMingTiB</family> </prefer> </alias> I.e. your favorite fonts for German followed by your favorite fonts for Chinese for each of the three generic aliases. Please tell us if you still encounter any problems. PS: I've added you to the CC: of http://bugzilla.novell.com/show_bug.cgi?id=244579 -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。 I � Unicode -- To unsubscribe, e-mail: opensuse-m17n+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-m17n+help@opensuse.org