Around 17 o'clock on Aug 14, Zenith Lau wrote:
> This is a problem, as most probably, I can't get two fonts with exactly
> same face but for two charset. Though, I know that, I can reorder the
> "yenti" and "fangsong" in the fonts.conf to archieve my desire result, but
> this will be same problem, if I am in hkscs locale.
Fontconfig has been recently changed to try and solve this problem. It
looks at LANG, LC_ALL and LC_CTYPE to try and figure out the right
language to look for in the fonts.
If you set one of the environment variables to zh-cn, fontconfig will
prefer the GB18030 font, using zh-hk will prefer a HKSCS font.
Fontconfig bases the language support of fonts on two things; languages
are "supported" by a font if their orthography is completely covered by
the font. In the case of Han fonts, I used the following orthographies:
zh-cn: GB2312
zh-hk: HKSCS-2001
zh-tw: Big5
ja: JIS X 0208 (1990)
ko: KSC 5601-1992
The second piece of information that I use for Han fonts is the OS/2
codePageRange bits. These are used to elide Han languages which are
explicitly *not* supported but whose orthographies happen to be covered by
the font. This is quite common with GB18030 fonts which covers GB2312,
Big5 and JIS X 0208. A GB18030 font which includes only bit 18 in the
codePageRange bits will only be listed as supporting zh-cn and not zh-tw,
even though it nominally covers Big5.
Keith Packard XFree86 Core Team HP Cambridge Research Lab
_______________________________________________
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts