[Fontconfig] Using chinese fonts by default

Nicolas Mailhot nicolas.mailhot at laposte.net
Sat Jun 10 14:45:58 PDT 2006


Le samedi 10 juin 2006 à 23:14 +0200, Philip Jägenstedt a écrit :

Hi,

> Unsurprisingly, this causes the english glyphs in SimSun to be used for
> all english text, which I don't want. So I tried adding
> 
> <match target="font">
>         <test name="family"><string>SimSun</string></test>
>         <edit name="lang" mode="assign"><string>zh-cn</string></edit>
> </match>
> 
> But this doesn't change anything, SimSun is still used for english writing.
> 
> What is the proper way to use the Chinese font by default but forbid it
> from being used for anything but Chinese?

I don't have the answer but I asked the almost the same question as you
this morning : have a way to force the use of a font different than the
default one for some specific script (the simple priority rules of
fontconfig aliases suck a lot since they don't take the actual langage
you are reading/writing into account)

In pseudo-code if script=foo (and style=bar?) use this font (list?)
instead of the default one.

You may try
===============
<match>
   <test name="lang">
      <string>zh-cn</string>
   </test>
<edit name="family" mode="prepend" binding="same">
   <string>SimSun</string>
</edit>
</match>
===============

It's not ideal for my needs, but maybe it's good enough for you (please
report if it works or if you find a better variation - I still have my
own problem to solve)

The opinions of the people who actually know fontconfig (as opposed to
an ignoranamus like me) are so far a mystery.

Regards,

-- 
Nicolas Mailhot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20060610/6b11704f/attachment.pgp


More information about the Fontconfig mailing list