[Fontconfig] How to delete "ja" lang from a specific font?

Kenichi Handa handa at m17n.org
Mon Oct 6 18:39:59 PDT 2008

In article <48EA4E43.1040800 at nmr.mgh.harvard.edu>, Qianqian Fang <fangq at nmr.mgh.harvard.edu> writes:

> an ugly fix would be adding the following block to your ~/.fonts.conf,
> replacing "Kochi Gothic" with your favorite Japanese font.

>         <match target="pattern">
>            <test equal="any" compare="eq" name="family">
>                    <string>WenQuanYi Zen Hei</string>
>            </test>
>            <test equal="any" compare="eq" name="lang">
>                    <string>ja</string>
>            </test>
>            <edit name="family" mode="prepend" binding="strong">
>                    <string>Kochi Gothic</string>
>            </edit>
>        </match>

Thank you for the prompt reply.  But, with that in
~/.fonts.conf, "WenQuanYi Zen Hei" is still listed by the
command "fc-list :lang=ja".

> The best solution would be re-optimize the font rendering order
> in 65-nonlatin.conf by fontconfig upstream, which I have heard
> that Badhad is doing it right now.

I'm not sure that is a good solution.  As we already have
better Japanese fonts than "WenQuanYi Zen Hei", I think just
telling fontconfig that the font doesn't support "ja" is the
simplest and best solution.  Isn't it possible?

Kenichi Handa
handa at ni.aist.go.jp

More information about the Fontconfig mailing list