如题,想用 Ubuntu 显示英文,用 noto sans cjk sc 显示中文。我从 archwiki 上看了看,照葫芦画瓢,折腾了一下,但是并没有实现。以下是~/.config/fontconfig/fonts.conf
的配置。不知道要怎么设置…
<fontconfig>
<alias>
<family>sans-serif</family>
<prefer>
<family>Ubuntu</family>
<family>Noto Sans CJK SC</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Ubuntu</family>
<family>Noto Serif CJK SC</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>JetBrains Mono</family>
<family>Noto Sans Mono CJK SC</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<match target="pattern">
<test qual="any" name="family">
<string>Helvetica</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>sans-serif</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>Consolas</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>monospace</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>Courier</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>monospace</string>
</edit>
</match>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
<edit mode="assign" name="hinting">
<bool>true</bool>
</edit>
<edit mode="assign" name="hintstyle">
<const>hintfull</const>
</edit>
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
</fontconfig>