-
-
Save aimerneige/4e1f6e14e449a77786b68099c8f1c329 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 CJK SC</string> | |
<string>Noto Sans</string> | |
<string>Twitter Color 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 CJK SC</string> | |
<string>Noto Serif</string> | |
<string>Twitter Color 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>Noto Sans Mono CJK SC</string> | |
<string>Symbols Nerd Font</string> | |
<string>Twitter Color Emoji</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>Cascadia Code</string> | |
</edit> | |
</match> | |
<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"> | |
<!-- not have HK --> | |
<string>Noto Serif CJK TC</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 monospace fonts --> | |
<match target="pattern"> | |
<test name="family" compare="contains"> | |
<string>Source Code</string> | |
</test> | |
<edit name="family" binding="strong"> | |
<string>Cascadia Code</string> | |
</edit> | |
</match> | |
<match target="pattern"> | |
<test name="lang" compare="contains"> | |
<string>en</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="lang" compare="contains"> | |
<string>en</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> | |
</fontconfig> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
source
how to use
1. Install some essential fonts
2. Put this file in
~/.config/fontconfig/fonts.conf
3. Test page:
4. Script (global)