[Fontconfig] Using chinese fonts by default

Keith Packard keithp at keithp.com
Sat Jun 10 14:30:59 PDT 2006

On Sat, 2006-06-10 at 23:14 +0200, Philip Jägenstedt wrote:
> Hello!
> On my Ubuntu system I have three Chinese fonts (AR PL ShanHeiSun Uni, AR
> PL ZenKai Uni and SimSun), two Japanese fonts and four Korean fonts. I'm
> interested in the Chinese looking good, wanting SimSun by default, but
> right now sometimes glyphs from the other Chinese fonts and the Japanese
> and Korean fonts are sometimes used, which looks horrible when they are a
> different style than the Chinese font. 

What you probably want here is to prefer fonts which support Chinese to
those supporting only Japanese or Korean. What I do is ensure that in
the face of no language information provided by the application, I add
*both* English and Japanese to the pattern. This pushes
English-supporting fonts to the fore and while Japanese-supporting fonts
follow along afterwards:

<!-- set desired language if unset -->
 <match target="pattern" >
  <test compare="eq" name="lang" qual="all" >
  <edit name="lang" >

The <test> is a bit misleading -- it's checking to see if no language
was set at all by ensuring that 'all' of the settings are equal to
'unset'; the only way that could be true is if there were no settings at

Replace 'en' with your own language, and 'ja' with your preferred form
of Chinese, one of zh-cn, zh-hk, zh-mo, zh-sg or zh-tw.

Thinking in languages instead of font families seems indirect, but we
haven't come up with a better way to specify what purpose the fonts are
intended for.

keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20060610/6a94c0a8/attachment.pgp

More information about the Fontconfig mailing list