[Fontconfig-bugs] [Bug 91958] New: Language Match problem for Chinese, Japanese and Korean

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 10 02:38:55 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=91958

            Bug ID: 91958
           Summary: Language Match problem for Chinese, Japanese and
                    Korean
           Product: fontconfig
           Version: 2.11
          Hardware: Other
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: library
          Assignee: fontconfig-bugs at lists.freedesktop.org
          Reporter: guoyunhebrave at gmail.com
        QA Contact: freedesktop at behdad.org

My system language is Chinese China (zh-CN).

I configured Chinese China, Chinese HongKong, Chinese Taiwan, Japanese and
Korean fonts. Chinese China font is good as I configured. But Japanese, Korean,
Chinese Hongkong, Chinese Taiwan fonts will use Chinese China font before their
own fonts.

It seems "Chinese China" will override all "CJK" languages. This is not the
right behavior.

For example I set sans-serif:

Nimbus Sans L
zh-cn: WenQuanYi Zen Hei
zh-tw: WenQuanYi Micro Hei
zh-hk: WenQuanYi Micro Hei
ja: Droid Sans Japanese
ko: Droid Sans Fallback

The fc-match results are:

sans:lang=zh-cn
n019003l.pfb: "Nimbus Sans L" "Regular"
n019004l.pfb: "Nimbus Sans L" "Bold"
n019023l.pfb: "Nimbus Sans L" "Regular Italic"
n019024l.pfb: "Nimbus Sans L" "Bold Italic"
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
...(correct)

sans:lang=zh-tw
n019003l.pfb: "Nimbus Sans L" "Regular"
n019004l.pfb: "Nimbus Sans L" "Bold"
n019023l.pfb: "Nimbus Sans L" "Regular Italic"
n019024l.pfb: "Nimbus Sans L" "Bold Italic"
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
wqy-microhei.ttc: "WenQuanYi Micro Hei" "Regular"
...(wrong, Chinese China font inserted before Chinese Taiwan font)

sans:lang=zh-hk
n019003l.pfb: "Nimbus Sans L" "Regular"
n019004l.pfb: "Nimbus Sans L" "Bold"
n019023l.pfb: "Nimbus Sans L" "Regular Italic"
n019024l.pfb: "Nimbus Sans L" "Bold Italic"
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
wqy-microhei.ttc: "WenQuanYi Micro Hei" "Regular"
...(wrong, Chinese China font inserted before Chinese Hongkong font)

sans:lang=ja
n019003l.pfb: "Nimbus Sans L" "Regular"
n019004l.pfb: "Nimbus Sans L" "Bold"
n019023l.pfb: "Nimbus Sans L" "Regular Italic"
n019024l.pfb: "Nimbus Sans L" "Bold Italic"
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
DroidSansJapanese.ttf: "Droid Sans Japanese" "Regular"
...(wrong, Chinese China font inserted before Japanese font)

sans:lang=ko
n019003l.pfb: "Nimbus Sans L" "Regular"
n019004l.pfb: "Nimbus Sans L" "Bold"
n019023l.pfb: "Nimbus Sans L" "Regular Italic"
n019024l.pfb: "Nimbus Sans L" "Bold Italic"
wqy-zenhei.ttc: "WenQuanYi Zen Hei" "Regular"
DroidSansFallbackFull.ttf: "Droid Sans Fallback" "Regular"
...(wrong, Chinese China font inserted before Korean font)

Here is a part of my fonts.conf user configuration:

--------------------------------------------------------
  <match>
    <test name="family">
      <string>sans-serif</string>
    </test>
    <edit binding="strong" mode="prepend" name="family">
      <string>Nimbus Sans L</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>serif</string>
    </test>
    <edit binding="strong" mode="prepend" name="family">
      <string>Nimbus Roman No9 L</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>monospace</string>
    </test>
    <edit binding="strong" mode="prepend" name="family">
      <string>DejaVu Sans Mono</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>sans-serif</string>
    </test>
    <test compare="eq" name="lang">
      <string>zh-hk</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>WenQuanYi Micro Hei</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>serif</string>
    </test>
    <test compare="eq" name="lang">
      <string>zh-hk</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>AR PL UKai HK</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>monospace</string>
    </test>
    <test compare="eq" name="lang">
      <string>zh-hk</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>WenQuanYi Micro Hei Mono</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>sans-serif</string>
    </test>
    <test compare="eq" name="lang">
      <string>zh-cn</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>WenQuanYi Zen Hei</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>serif</string>
    </test>
    <test compare="eq" name="lang">
      <string>zh-cn</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>AR PL UMing CN</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>monospace</string>
    </test>
    <test compare="eq" name="lang">
      <string>zh-cn</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>WenQuanYi Micro Hei Mono</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>sans-serif</string>
    </test>
    <test compare="eq" name="lang">
      <string>zh-tw</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>WenQuanYi Micro Hei</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>serif</string>
    </test>
    <test compare="eq" name="lang">
      <string>zh-tw</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>AR PL UMing TW</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>monospace</string>
    </test>
    <test compare="eq" name="lang">
      <string>zh-tw</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>WenQuanYi Micro Hei Mono</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>sans-serif</string>
    </test>
    <test compare="eq" name="lang">
      <string>ja</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>Droid Sans Japanese</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>serif</string>
    </test>
    <test compare="eq" name="lang">
      <string>ja</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>AR PL UMing TW</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>monospace</string>
    </test>
    <test compare="eq" name="lang">
      <string>ja</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>Droid Sans Japanese</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>sans-serif</string>
    </test>
    <test compare="eq" name="lang">
      <string>ko</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>Droid Sans Fallback</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>serif</string>
    </test>
    <test compare="eq" name="lang">
      <string>ko</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>AR PL UMing TW</string>
    </edit>
  </match>
  <match>
    <test name="family">
      <string>monospace</string>
    </test>
    <test compare="eq" name="lang">
      <string>ko</string>
    </test>
    <edit mode="prepend" name="family" binding="strong">
      <string>WenQuanYi Micro Hei Mono</string>
    </edit>
  </match>
--------------------------------------------------------

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20150910/f75045af/attachment.html>


More information about the Fontconfig-bugs mailing list