<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Language Match problem for Chinese, Japanese and Korean"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91958">91958</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Language Match problem for Chinese, Japanese and Korean
</td>
</tr>
<tr>
<th>Product</th>
<td>fontconfig
</td>
</tr>
<tr>
<th>Version</th>
<td>2.11
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>library
</td>
</tr>
<tr>
<th>Assignee</th>
<td>fontconfig-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>guoyunhebrave@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>freedesktop@behdad.org
</td>
</tr></table>
<p>
<div>
<pre>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>
--------------------------------------------------------</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>