Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5cf6079726 |
@@ -1,6 +1,313 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||||
<fontconfig>
|
<fontconfig>
|
||||||
|
<!-- CJK: give language-tagged text the Noto CJK variant that matches its
|
||||||
|
language. noto-fonts-cjk ships all five, Han glyph shapes differ between
|
||||||
|
them, and the generic assigns below would otherwise hand tagged CJK text
|
||||||
|
to families with no Han coverage, leaving the variant to a charset-scan
|
||||||
|
lottery. Chinese arrives under many tags (W3C recommends the zh-Hans and
|
||||||
|
zh-Hant script forms), so the tags are first folded onto one tag per
|
||||||
|
variant. Order is load-bearing: a bare zh and a bare zh-hant satisfy
|
||||||
|
the contains test of every one of their extensions, so both are pinned
|
||||||
|
by exact matches before the extension folds run. Cantonese under its
|
||||||
|
own primary tag folds to Hong Kong forms, except explicitly
|
||||||
|
Simplified Cantonese, which folds to SC. -->
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="eq">
|
||||||
|
<string>zh</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-cn</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="eq">
|
||||||
|
<string>zh-hant</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-tw</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-hant-hk</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-hk</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-hant-mo</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-hk</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-hant</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-tw</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-hans</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-cn</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-sg</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-cn</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-mo</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-hk</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="eq">
|
||||||
|
<string>yue</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-hk</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>yue-hans</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-cn</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>yue-cn</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-cn</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>yue</string>
|
||||||
|
</test>
|
||||||
|
<edit name="lang" mode="assign">
|
||||||
|
<string>zh-hk</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Each variant is then prepended for its tag, ahead of the assigns below
|
||||||
|
because these test the generic names those assigns replace. Unlike the
|
||||||
|
Arabic rule further down, these carry a family test, so the prepend
|
||||||
|
lands just ahead of the matched generic and a concrete family the app
|
||||||
|
asked for stays in front of the variant. -->
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-cn</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>sans-serif</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Sans CJK SC</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-cn</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>serif</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Serif CJK SC</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-cn</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>monospace</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Sans Mono CJK SC</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-hk</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>sans-serif</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Sans CJK HK</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-hk</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>serif</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Serif CJK HK</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-hk</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>monospace</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Sans Mono CJK HK</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-tw</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>sans-serif</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Sans CJK TC</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-tw</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>serif</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Serif CJK TC</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>zh-tw</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>monospace</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Sans Mono CJK TC</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>ja</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>sans-serif</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Sans CJK JP</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>ja</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>serif</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Serif CJK JP</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>ja</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>monospace</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Sans Mono CJK JP</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>ko</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>sans-serif</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Sans CJK KR</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>ko</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>serif</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Serif CJK KR</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="lang" compare="contains">
|
||||||
|
<string>ko</string>
|
||||||
|
</test>
|
||||||
|
<test name="family">
|
||||||
|
<string>monospace</string>
|
||||||
|
</test>
|
||||||
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
|
<string>Noto Sans Mono CJK KR</string>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
|
||||||
<match target="pattern">
|
<match target="pattern">
|
||||||
<test name="family" qual="any">
|
<test name="family" qual="any">
|
||||||
<string>sans-serif</string>
|
<string>sans-serif</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user