Fix fontconfig

This commit is contained in:
rydesun 2021-02-10 19:05:32 +08:00
parent 730ec11913
commit 2c65496cd2
6 changed files with 150 additions and 1 deletions

View file

@ -22,7 +22,8 @@
<string>Noto Serif CJK SC</string>
</test>
<edit name="family" binding="strong">
<string>Noto Serif CJK HK</string>
<!-- not have HK -->
<string>Noto Serif CJK TC</string>
</edit>
</match>

View file

@ -0,0 +1,53 @@
<?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 Sans HW SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Sans HW HC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Source Han Sans HW SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Sans HW TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Source Han Sans HW SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Sans HW</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Source Han Sans HW SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Sans HW K</string>
</edit>
</match>
</fontconfig>

View file

@ -0,0 +1,54 @@
<?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 Sans SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Sans HC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
</test>
<test name="family">
<string>Source Han Sans SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Sans TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ja</string>
</test>
<test name="family">
<string>Source Han Sans SC</string>
</test>
<edit name="family" binding="strong">
<!-- not have language notation -->
<string>Source Han Sans</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>ko</string>
</test>
<test name="family">
<string>Source Han Sans SC</string>
</test>
<edit name="family" binding="strong">
<string>Source Han Sans K</string>
</edit>
</match>
</fontconfig>

View file

@ -1,6 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="lang">
<string>zh-HK</string>
@ -9,9 +10,11 @@
<string>Source Han Serif SC</string>
</test>
<edit name="family" binding="strong">
<!-- not have HC -->
<string>Source Han Serif TC</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<string>zh-TW</string>
@ -32,6 +35,7 @@
<string>Source Han Serif SC</string>
</test>
<edit name="family" binding="strong">
<!-- not have language notation -->
<string>Source Han Serif</string>
</edit>
</match>

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 Sans HW</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Iosevka Custom</string>
</edit>
</match>
</fontconfig>

View file

@ -0,0 +1,20 @@
<?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="not_contains">
<string>HW</string>
</test>
<test name="family" compare="contains">
<string>Source Han Sans</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans</string>
</edit>
</match>
</fontconfig>