Re: Simplified Chinese in SuSE

Mike FABIAN <[email protected]>
Newsgroups gmane.linux.suse.m17n
Message-ID <[email protected]>
Marc Waeckerlin <[email protected]> :

> Some questions:
>  - What is the simplest way for me to correct this?

LC_CTYPE=zh_CN.UTF-8

Our Qt package contains some hacks to prefer simplified
Chinese fonts when running in a simplified Chinese locale.

Whey you are running in non-Chinese locales like de_DE.UTF-8,
en_US.UTF-8, ..., this hack doesn't do anything.

Apparently you are running with LC_CTYPE not set to zh_CN.UTF-8 and
you get traditional Chinese fonts.

>  - Can I patch it in the global /etc (for all users)?

You can edit the font substitutions in /etc/X11/qtrc to prefer
simplified Chinese fonts.

>  - When and how will SuSE correct this? (Mike?)

It is a Qt problem that Qt cannot fallback to a different font
when some glyphs are missing. When using GTK2 in zh_TW.UTF-8 locale
for example, a traditional Chinese font will be preferred.
But when glyphs are used which are not available in that font,
GTK2 continues to search for other fonts which have the missing
glyphs. I.e. you will get a mixture of glyphs from different
fonts which may not look nice but at least it is readable.

Qt can currently use only *one* font for the Han region.

To get the right one, you have to set LC_CTYPE to your preferred
language.

Even for GTK2 you have to do that if you want optimal results for your
preferred language.

>  - Why aren't there more people from China complaining this?

Because they are using zh_CN.UTF-8 locale.

>    Have I some special configuration, which does not work
>    (e.g. my main language is German, one of my secondary
>    languages is simplified Chinese)?

Yes, I think that is the reason.

But you can leave your KDE settings German, that is no problem.  You
only need to set LC_CTYPE=zh_CN.UTF-8.  For example, the following
setting should be OK for you:

    export LANG=de_DE.UTF-8
    export LC_CTYPE=de_DE.UTF-8

(all other LC_ variables unset in this example).

You have to give a hint somewhere that you prefer simplified Chinese
fonts over traditional Chinese fonts. Qt will check LC_CTYPE to find
out which font to prefer. And you can use qtrc for fine tuning.

GTK also uses LC_CTYPE to select the preferred fonts because GTK just
uses fontconfig and that checks LC_CTYPE.

Qt also uses fontconfig, but not as directly as GTK, Qt has many
additional hacks which are more harmful than useful currently.

I hope this will get better with Qt4.

Anyway, it will always be a good idea to set LC_CTYPE either to
zh_CN.UTF-8 or zh_TW.UTF-8 to give a hint which fonts you prefer.

-- 
Mike FABIAN   <[email protected]>   http://www.suse.de/~mfabian



-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.