Update fontconfig

This commit is contained in:
rydesun 2021-02-09 22:09:04 +08:00
parent 6f7692cd1d
commit 292daf9769
9 changed files with 581 additions and 397 deletions

View file

@ -0,0 +1,46 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<!-- Default system-ui fonts -->
<match target="pattern">
<test name="family">
<string>system-ui</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>sans-serif</string>
</edit>
</match>
<!-- Default sans-serif fonts-->
<match target="pattern">
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Sarasa Gothic SC</string>
</edit>
</match>
<!-- Default serif fonts-->
<match target="pattern">
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Source Han Serif SC</string>
</edit>
</match>
<!-- Default monospace fonts-->
<match target="pattern">
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Iosevka Custom</string>
<string>Sarasa Mono SC</string>
</edit>
</match>
</fontconfig>

View file

@ -0,0 +1,149 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="lang">
<string>zh-HK</string>
</test>
<test name="family">
<string>Noto Sans CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK HK</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-HK</string>
</test>
<test name="family">
<string>Noto Serif CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK HK</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-HK</string>
</test>
<test name="family">
<string>Noto Sans Mono CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans Mono CJK HK</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Noto Sans CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Noto Serif CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Noto Sans Mono CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans Mono CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Noto Sans CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Noto Serif CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Noto Sans Mono CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans Mono CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Noto Sans CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Noto Serif CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Noto Sans Mono CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans Mono CJK KR</string>
</edit>
</match>
</fontconfig>

View file

@ -0,0 +1,101 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="lang">
<string>zh-HK</string>
</test>
<test name="family">
<string>Sarasa Gothic SC</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Gothic HC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-HK</string>
</test>
<test name="family">
<string>Sarasa Mono SC</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Mono HC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Sarasa Gothic SC</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Gothic TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Sarasa Mono SC</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Mono TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Sarasa Gothic SC</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Gothic J</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Sarasa Mono SC</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Mono J</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Sarasa Gothic SC</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Gothic K</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Sarasa Mono SC</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Mono K</string>
</edit>
</match>
</fontconfig>

View file

@ -0,0 +1,51 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="lang">
<string>zh-HK</string>
</test>
<test name="family">
<string>Source Han Serif SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Serif TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Source Han Serif SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Serif TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Source Han Serif SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Serif</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Source Han Serif SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Serif K</string>
</edit>
</match>
</fontconfig>

View file

@ -0,0 +1,147 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<!-- Replace sans-serif fonts -->
<match target="pattern">
<test name="family">
<string>Cantarell</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>Arial</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>Tahoma</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>Calibri</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="family" compare="contains">
<string>Microsoft YaHei</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Gothic SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>微软雅黑</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Gothic SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>SimHei</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Gothic SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>黑体</string>
</test>
<edit name="family" binding="strong">
<string>Sarasa Gothic SC</string>
</edit>
</match>
<!-- Replace serif fonts -->
<match target="pattern">
<test name="family">
<string>Times New Roman</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif</string>
</edit>
</match>
<match target="pattern">
<test name="family" compare="contains">
<string>SimSun</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Serif SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>宋体</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Serif SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>FangSong</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Serif SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>仿宋</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Serif SC</string>
</edit>
</match>
<!-- Replace monospace fonts -->
<match target="pattern">
<test name="family" compare="contains">
<string>Source Code</string>
</test>
<edit name="family" binding="strong">
<string>Iosevka Custom</string>
</edit>
</match>
<!-- Replace emoji fonts -->
<match target="pattern">
<test name="family" compare="contains">
<string>Noto Color Emoji</string>
</test>
<test name="prgname" compare="not_eq">
<string>firefox</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Blobmoji</string>
</edit>
</match>
</fontconfig>

View file

@ -0,0 +1,41 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="prgname" compare="not_eq">
<string>chrome</string>
</test>
<test name="family" compare="contains">
<string>Noto Sans CJK</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="prgname" compare="not_eq">
<string>chrome</string>
</test>
<test name="family" compare="contains">
<string>Noto Serif CJK</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Serif</string>
</edit>
</match>
<match target="pattern">
<test name="prgname" compare="not_eq">
<string>chrome</string>
</test>
<test name="family" compare="contains">
<string>Noto Sans Mono CJK</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Iosevka Custom</string>
</edit>
</match>
</fontconfig>

View file

@ -0,0 +1,29 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="prgname" compare="not_eq">
<string>chrome</string>
</test>
<test name="family" compare="contains">
<string>Sarasa Gothic</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="prgname" compare="not_eq">
<string>chrome</string>
</test>
<test name="family" compare="contains">
<string>Sarasa Mono</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Iosevka Custom</string>
</edit>
</match>
</fontconfig>

View file

@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="prgname" compare="not_eq">
<string>chrome</string>
</test>
<test name="family" compare="contains">
<string>Source Han Serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Serif</string>
</edit>
</match>
</fontconfig>

View file

@ -1,397 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<!-- Default system-ui fonts -->
<match target="pattern">
<test name="family">
<string>system-ui</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>sans-serif</string>
</edit>
</match>
<!-- Default sans-serif fonts-->
<match target="pattern">
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans</string>
<string>Noto Sans CJK SC</string>
<string>emoji</string>
</edit>
</match>
<!-- Default serif fonts-->
<match target="pattern">
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Serif</string>
<string>Noto Serif CJK SC</string>
<string>emoji</string>
</edit>
</match>
<!-- Default monospace fonts-->
<match target="pattern">
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Iosevka Custom</string>
<string>Noto Sans Mono CJK SC</string>
<string>emoji</string>
</edit>
</match>
<!-- Default emoji fonts -->
<match target="pattern">
<test name="family">
<string>emoji</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Symbols Nerd Font</string>
<string>Blobmoji</string>
</edit>
</match>
<!-- Other languages -->
<match target="pattern">
<test name="lang">
<string>zh-HK</string>
</test>
<test name="family">
<string>Noto Sans CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK HK</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-HK</string>
</test>
<test name="family">
<string>Noto Serif CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK HK</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-HK</string>
</test>
<test name="family">
<string>Noto Sans Mono CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans Mono CJK HK</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Noto Sans CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Noto Serif CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Noto Sans Mono CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans Mono CJK TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Noto Sans CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Noto Serif CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Noto Sans Mono CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans Mono CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Noto Sans CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Noto Serif CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK KR</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Noto Sans Mono CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans Mono CJK KR</string>
</edit>
</match>
<!-- Replace sans-serif fonts -->
<match target="pattern">
<test name="family">
<string>Cantarell</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>Arial</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>Tahoma</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>Calibri</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="family" compare="contains">
<string>Microsoft YaHei</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>微软雅黑</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>SimHei</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>黑体</string>
</test>
<edit name="family" binding="strong">
<string>Noto Sans CJK SC</string>
</edit>
</match>
<!-- Replace serif fonts -->
<match target="pattern">
<test name="family">
<string>Times New Roman</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif</string>
</edit>
</match>
<match target="pattern">
<test name="family" compare="contains">
<string>SimSun</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>宋体</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>FangSong</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>仿宋</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK SC</string>
</edit>
</match>
<!-- Replace monospace fonts -->
<match target="pattern">
<test name="family" compare="contains">
<string>Source Code</string>
</test>
<edit name="family" binding="strong">
<string>Iosevka Custom</string>
</edit>
</match>
<!-- Replace KaiTi fonts -->
<match target="pattern">
<test name="family">
<string>KaiTi</string>
</test>
<edit name="family" binding="strong">
<string>AR PL UKai CN</string>
<string>Noto Serif CJK SC</string>
</edit>
</match>
<match target="pattern">
<test name="family">
<string>楷体</string>
</test>
<edit name="family" binding="strong">
<string>AR PL UKai CN</string>
<string>Noto Serif CJK SC</string>
</edit>
</match>
<!-- KaiTi fonts fallback -->
<match target="pattern">
<test name="family" compare="contains">
<string>AR PL UKai</string>
</test>
<edit name="family" mode="append" binding="strong">
<string>Noto Serif CJK SC</string>
</edit>
</match>
<!-- Replace latin characters in CJK fonts -->
<match target="pattern">
<test name="family" compare="contains">
<string>Noto Sans CJK</string>
</test>
<test name="prgname" compare="not_eq">
<string>chrome</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test name="family" compare="contains">
<string>Noto Serif CJK</string>
</test>
<test name="prgname" compare="not_eq">
<string>chrome</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Serif</string>
</edit>
</match>
<match target="pattern">
<test name="family" compare="contains">
<string>Noto Sans Mono CJK</string>
</test>
<test name="prgname" compare="not_eq">
<string>chrome</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Iosevka Custom</string>
</edit>
</match>
<!-- Replace emoji fonts -->
<match target="pattern">
<test name="family" compare="contains">
<string>Noto Color Emoji</string>
</test>
<test name="prgname" compare="not_eq">
<string>firefox</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Blobmoji</string>
</edit>
</match>
</fontconfig>
<!-- vim: ft=xml
-->