Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] The wrong kanji



On Thu, Dec 9, 2010 at 5:10 PM, Travis Cardwell
<travis.cardwell@example.com> wrote:
> I currently cannot afford to get (too) distracted, but at some point I
> will prepare a clean VM, test some settings, and report back.

My wife ended up working late tonight, so I had time sooner than I expected! ;)

I confirmed that all `fontconfig-voodoo -s ja_JP` does is make a single symlink:
/etc/fonts/conf.avail/69-langauge-selector-ja-jp.conf ->
/etc/fonts/conf.d/69-langauge-selector-ja-jp.conf

This file creates strong associations to Japanese fonts for generic
font families, making them take priority over the Chinese fonts.  The
associations, however, have a test that makes sure that your locale is
a Japanese one.  If you remove these conditions (see the diff at the
bottom of this message), then it makes the Japanese fonts take
priority regardless of the locale.  This means, of course, that though
Japanese text will be fixed, Chinese text will have some Japanese
glyphs.  I do not know how to fix this issue in a generic way; I do
not think fontconfig was designed with this problem in mind,
unfortunately.

For anybody who wants to keep Chinese fonts installed yet make the
Japanese fonts the default, I suggest one of the following instead of
editing /etc/fonts/conf.d/69-langauge-selector-ja-jp.conf:

1. If you would like the changes to affect the whole system, put the
contents of /etc/fonts/conf.d/69-langauge-selector-ja-jp.conf (minus
the conditions) into local.conf.

2. If you would like the changes to affect just specific users, put
the contents of /etc/fonts/conf.d/69-langauge-selector-ja-jp.conf
(minus the conditions) into ~/.fonts.conf for each such user.

In both cases, run `sudo fontconfig-voodoo -r` to remove any existing
fontconfig-voodoo config, as you are overriding it anyway.

Travis

----

$ git --no-pager diff
--- a/etc/fonts/conf.avail/69-language-selector-ja-jp.conf
+++ b/etc/fonts/conf.avail/69-language-selector-ja-jp.conf
@@ -3,9 +3,6 @@
 <fontconfig>
     <!-- Japanese (ja) -->
     <match target="pattern">
-        <test name="lang" compare="contains">
-            <string>ja</string>
-        </test>
         <test qual="any" name="family">
             <string>serif</string>
         </test>
@@ -21,9 +18,6 @@
     </match>

     <match target="pattern">
-        <test name="lang" compare="contains">
-            <string>ja</string>
-        </test>
         <test qual="any" name="family">
             <string>sans-serif</string>
         </test>
@@ -41,9 +35,6 @@
     </match>

     <match target="pattern">
-        <test name="lang" compare="contains">
-            <string>ja</string>
-        </test>
         <test qual="any" name="family">
             <string>monospace</string>
         </test>


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links