home,nixos,fonts: noto cjk -> source han & fontconfig changes

This commit is contained in:
Guanran Wang 2023-11-08 15:34:00 +08:00
parent 9467a6ec62
commit 6e84d833eb
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
8 changed files with 232 additions and 204 deletions

View file

@ -1,30 +1,25 @@
{pkgs, ...}: {
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
### Noto Fonts
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji
### Source Han
source-han-sans
source-han-serif
source-han-mono
### Sans
inter
roboto
### Monospace
fira-code
jetbrains-mono
(nerdfonts.override {
fonts = [
"FiraCode"
"JetBrainsMono"
"NerdFontsSymbolsOnly"
];
})
### Adobe Source Han
source-han-sans
source-han-serif
source-han-mono
### Noto Fonts
noto-fonts
noto-fonts-emoji
];
}

View file

@ -0,0 +1,16 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its">
<its:translateRule selector="/fontconfig/*[not(self::description)]" translate="no"/>
</its:rules>
<!-- Reject DejaVu Sans -->
<!-- why is DejaVu Sans still here after fonts.enableDefaultPackages = false -->
<selectfont>
<rejectfont>
<pattern><patelt name="family" ><string>DejaVu Sans</string></patelt></pattern>
</rejectfont>
</selectfont>
</fontconfig>

View file

@ -0,0 +1,23 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its">
<its:translateRule selector="/fontconfig/*[not(self::description)]" translate="no"/>
</its:rules>
<!-- Rebind old Chinese fonts -->
<!-- Sans -->
<match target="pattern">
<test name="family" qual="any"><string>WenQuanYi Zen Hei</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>WenQuanYi Micro Hei</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>WenQuanYi Micro Hei Light</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
</match>
</fontconfig>

View file

@ -1,8 +1,9 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its"><its:translateRule selector="/fontconfig/*[not(self::description)]" translate="no"/></its:rules>
<description>trash Font Config 2.0</description>
<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its">
<its:translateRule selector="/fontconfig/*[not(self::description)]" translate="no"/>
</its:rules>
<!-- Adjust font order for Qt applications -->
<alias>
@ -40,4 +41,5 @@
<family>Noto Sans Runic</family>
</prefer>
</alias>
</fontconfig>

View file

@ -0,0 +1,23 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its">
<its:translateRule selector="/fontconfig/*[not(self::description)]" translate="no"/>
</its:rules>
<!-- Rebind unliked fonts -->
<!-- Monospace -->
<match target="pattern">
<test name="family" qual="any"><string>Liberation Mono</string></test>
<edit name="family" binding="same" mode="assign"><string>monospace</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>SF Mono</string></test>
<edit name="family" binding="same" mode="assign"><string>monospace</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>Noto Sans Mono</string></test>
<edit name="family" binding="same" mode="assign"><string>monospace</string></edit>
</match>
</fontconfig>

View file

@ -1,8 +1,9 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its"><its:translateRule selector="/fontconfig/*[not(self::description)]" translate="no"/></its:rules>
<description>trash Font Config 2.0</description>
<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its">
<its:translateRule selector="/fontconfig/*[not(self::description)]" translate="no"/>
</its:rules>
<!--
https://caniuse.com/extended-system-fonts

View file

@ -0,0 +1,28 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its">
<its:translateRule selector="/fontconfig/*[not(self::description)]" translate="no"/>
</its:rules>
<!-- Rebind Windows fonts -->
<!-- Sans -->
<match target="pattern">
<test name="family" qual="any"><string>Microsoft YaHei</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>SimHei</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
</match>
<!-- Serif -->
<match target="pattern">
<test name="family" qual="any"><string>SimSun</string></test>
<edit name="family" binding="same" mode="assign"><string>serif</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>SimSun-18030</string></test>
<edit name="family" binding="same" mode="assign"><string>serif</string></edit>
</match>
</fontconfig>

View file

@ -4,7 +4,10 @@
<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its">
<its:translateRule selector="/fontconfig/*[not(self::description)]" translate="no"/>
</its:rules>
<description>trash Font Config 2.0</description>
<description>trash Font Config 3.0</description>
<!-- Modified version of https://wiki.archlinux.org/title/Font_configuration/Examples#CJK,_but_other_Latin_fonts_are_preferred -->
<!--
(default = true) Use antialias
Disable embedded bitmap fonts
@ -27,146 +30,194 @@
</match>
<!-- Latin font -->
<match>
<test name="family" qual="any"><string>serif</string></test>
<edit name="family" binding="strong" mode="prepend"><string>Noto Serif</string></edit>
<!-- Default serif font -->
<alias binding="strong"><family>serif</family>
<prefer><family>Source Han Serif SC</family></prefer></alias>
<!-- Default sans-serif font -->
<alias binding="strong"><family>sans-serif</family>
<prefer><family>Inter</family></prefer></alias>
<!-- Default monospace font -->
<alias binding="strong"><family>monospace</family>
<prefer><family>JetBrainsMono Nerd Font</family></prefer></alias>
<!-- Default system-ui font -->
<alias binding="strong"><family>system-ui</family>
<prefer><family>Inter</family></prefer></alias>
<!-- CJK -->
<!-- Default fonts when the "lang" attribute is not given -->
<!-- You can change this font to the language variant you want -->
<match target="pattern">
<test name="family"><string>serif</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Serif SC</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>sans-serif</string></test>
<edit name="family" binding="strong" mode="prepend"><string>Inter</string></edit>
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans SC</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>monospace</string></test>
<edit name="family" binding="strong" mode="prepend"><string>JetBrainsMono Nerd Font</string></edit>
<test name="family"><string>monospace</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Mono SC</string></edit>
</match>
<match target="pattern">
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans SC</string></edit>
</match>
<!-- Chinese -->
<!-- "lang=zh" or "lang=zh-*" -->
<!-- Chinese, no variants specified (Simplefied, as it is the modern standard) -->
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh</string></test>
<test name="family"><string>serif</string></test>
<edit name="family" mode="prepend"><string>Noto Serif CJK SC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Serif SC</string></edit>
</match>
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh</string></test>
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="prepend"><string>Noto Sans CJK SC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans SC</string></edit>
</match>
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh</string></test>
<test name="family"><string>monospace</string></test>
<edit name="family" mode="prepend"><string>Noto Sans Mono CJK SC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Mono SC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh</string></test>
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans SC</string></edit>
</match>
<!-- Chinese Variants (standard, specified by variants) -->
<!-- not working? tried `fc-match -sort serif:lang=zh-hk`, but it returns `Noto Sans CJK SC` instead of HK-->
<!-- I have no idea when should i use prepend and append, so i will use prepend in all cases :( -->
<!-- "lang=zh-hans" or "lang=zh-hans-*" -->
<!-- Chinese, simplefied variants (used in Mainland China) -->
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hans</string></test>
<test name="family"><string>serif</string></test>
<edit name="family" mode="prepend"><string>Noto Serif CJK SC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans SC</string></edit>
</match>
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hans</string></test>
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="prepend"><string>Noto Sans CJK SC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans SC</string></edit>
</match>
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hans</string></test>
<test name="family"><string>monospace</string></test>
<edit name="family" mode="prepend"><string>Noto Sans Mono CJK SC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Mono SC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hans</string></test>
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans SC</string></edit>
</match>
<!-- "lang=zh-hant" or "lang=zh-hant-*" -->
<!-- Chinese, traditional variants (used in Taiwan) -->
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hant</string></test>
<test name="family"><string>serif</string></test>
<edit name="family" mode="prepend"><string>Noto Serif CJK TC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Serif TC</string></edit>
</match>
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hant</string></test>
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="prepend"><string>Noto Sans CJK TC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans TC</string></edit>
</match>
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hant</string></test>
<test name="family"><string>monospace</string></test>
<edit name="family" mode="prepend"><string>Noto Sans Mono CJK TC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Mono TC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hant</string></test>
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans TC</string></edit>
</match>
<!-- "lang=zh-hant-hk" or "lang=zh-hant-hk-*" -->
<!-- Chinese, traditional variants, Hong Kong variants -->
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hant</string></test>
<test name="family"><string>serif</string></test>
<edit name="family" mode="prepend"><string>Noto Serif CJK HK</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Serif HC</string></edit>
</match>
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hant</string></test>
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="prepend"><string>Noto Sans CJK HK</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans HC</string></edit>
</match>
<match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hant</string></test>
<test name="family"><string>monospace</string></test>
<edit name="family" mode="prepend"><string>Noto Sans Mono CJK HK</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Mono HC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hant</string></test>
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans HC</string></edit>
</match>
<!-- Chinese Compatible (non-standard, specified by country) -->
<!-- "lang=zh-cn" or "lang=zh-cn-*" -->
<!-- Chinese, Mainland China variants (Simplefied) -->
<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"><string>Noto Serif CJK SC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans SC</string></edit>
</match>
<match>
<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"><string>Noto Sans CJK SC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans SC</string></edit>
</match>
<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"><string>Noto Sans Mono CJK SC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Mono SC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-cn</string></test>
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans SC</string></edit>
</match>
<!-- "lang=zh-tw" or "lang=zh-tw-*" -->
<!-- Chinese, Taiwan (Traditional) variants -->
<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"><string>Noto Serif CJK TC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Serif TC</string></edit>
</match>
<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"><string>Noto Sans CJK TC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans TC</string></edit>
</match>
<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"><string>Noto Sans Mono CJK TC</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Mono TC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-tw</string></test>
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans TC</string></edit>
</match>
<!-- "lang=zh-hk" or "lang=zh-hk-*" -->
<!-- Chinese, Hong Kong (variant of Traditional Chinese) variants -->
<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"><string>Noto Serif CJK HK</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Serif HC</string></edit>
</match>
<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"><string>Noto Sans CJK HK</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans HC</string></edit>
</match>
<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"><string>Noto Sans Mono CJK HK</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Mono HC</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="contains"><string>zh-hk</string></test>
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans HC</string></edit>
</match>
<!-- Japanese -->
@ -174,17 +225,22 @@
<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>
<edit name="family" mode="append" binding="strong"><string>Source Han Serif</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>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans</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>
<edit name="family" mode="append" binding="strong"><string>Source Han Mono</string></edit>
</match>
<match target="pattern">
<test name="lang" compare="contains"><string>ja</string></test>
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans</string></edit>
</match>
<!-- Korean -->
@ -192,138 +248,22 @@
<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>
<edit name="family" mode="append" binding="strong"><string>Source Han Serif K</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>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans K</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>
<!-- Fallback fonts preference order -->
<!-- Might not be nessessary -->
<alias>
<family>sans-serif</family>
<prefer>
<family>Inter</family>
<family>Roboto</family>
<family>Noto Sans</family>
<family>Noto Sans CJK SC</family>
<family>Noto Sans CJK TC</family>
<family>Noto Sans CJK JP</family>
<family>Noto Sans CJK KR</family>
<family>Source Han Sans CN</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
<!-- ??? whats all the stuff below ??? -->
<family>DejaVu Sans</family>
<family>Verdana</family>
<family>Arial</family>
<family>Albany AMT</family>
<family>Luxi Sans</family>
<family>Nimbus Sans L</family>
<family>Nimbus Sans</family>
<family>Helvetica</family>
<family>Lucida Sans Unicode</family>
<family>BPG Glaho International</family>
<family>Tahoma</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Noto Serif</family>
<family>Noto Serif CJK SC</family>
<family>Noto Serif CJK TC</family>
<family>Noto Serif CJK JP</family>
<family>Noto Serif CJK KR</family>
<family>Source Han Serif CN</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>JetBrainsMono Nerd Font</family>
<family>Noto Sans Mono</family>
<family>Noto Sans Mono CJK SC</family>
<family>Noto Sans Mono CJK TC</family>
<family>Noto Sans Mono CJK JP</family>
<family>Noto Sans Mono CJK KR</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
</prefer>
</alias>
<!-- Rebind Windows fonts to sans-serif -->
<!-- Sans -->
<match target="pattern">
<test name="family" qual="any"><string>Microsoft YaHei</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
<edit name="family" mode="append" binding="strong"><string>Source Han Mono K</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>SimHei</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
</match>
<!-- Serif -->
<match target="pattern">
<test name="family" qual="any"><string>SimSun</string></test>
<edit name="family" binding="same" mode="assign"><string>serif</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>SimSun-18030</string></test>
<edit name="family" binding="same" mode="assign"><string>serif</string></edit>
</match>
<!-- Rebind old Chinese fonts -->
<!-- Sans -->
<match target="pattern">
<test name="family" qual="any"><string>WenQuanYi Zen Hei</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>WenQuanYi Micro Hei</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>WenQuanYi Micro Hei Light</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
</match>
<!-- Uniform unliked fonts -->
<!-- Monospace -->
<match target="pattern">
<test name="family" qual="any"><string>Liberation Mono</string></test>
<edit name="family" binding="same" mode="assign"><string>monospace</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>SF Mono</string></test>
<edit name="family" binding="same" mode="assign"><string>monospace</string></edit>
</match>
<match target="pattern">
<test name="family" qual="any"><string>Noto Sans Mono</string></test>
<edit name="family" binding="same" mode="assign"><string>monospace</string></edit>
</match>
<!-- why is DejaVu Sans still here after fonts.enableDefaultPackages = false -->
<selectfont>
<rejectfont>
<pattern><patelt name="family" ><string>DejaVu Sans</string></patelt></pattern>
</rejectfont>
</selectfont>
<!-- Portal 2 missing non Latin font -->
<!-- (maybe even includes other valve games, since csgo console is missing non latin font too) -->
<!-- https://wiki.archlinux.org/title/Steam/Game-specific_troubleshooting#Portal_2 -->
<match target="pattern">
<test name="family" qual="any"><string>Helvetica</string></test>
<edit name="family" binding="same" mode="assign"><string>sans-serif</string></edit>
<test name="lang" compare="contains"><string>ko</string></test>
<test name="family"><string>system-ui</string></test>
<edit name="family" mode="append" binding="strong"><string>Source Han Sans K</string></edit>
</match>
</fontconfig>