You are not logged in.
I am trying to write a fontconfig that uses proper fonts for CJK and emoji (i.e. use Open Sans > DejaVu Sans > Noto Sans for sans-serif, DejaVu Serif > Noto Serif > HanaMinA for serif, etc.). I came up with this:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<edit mode="prepend" name="family">
<string>sans-serif</string>
</edit>
</match>
<alias>
<family>serif</family>
<prefer>
<family>DejaVu Serif</family>
<family>Noto Serif CJK JP</family>
<family>Noto Serif CJK TC</family>
<family>Noto Serif CJK SC</family>
<family>HanaMinA</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Open Sans</family>
<family>DejaVu Sans</family>
<family>Noto Sans CJK JP</family>
<family>Noto Sans CJK TC</family>
<family>Noto Sans CJK SC</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
<family>Noto Sans Mono CJK JP</family>
<family>Noto Sans Mono CJK TC</family>
<family>Noto Sans Mono CJK SC</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
</fontconfig>Everything is appearing in Open Sans, including code on GitHub and ArchWiki and Rofi (which I configured to use the monospace alias). Changing line 6 to serif, for example, causes everything to be in DejaVu Serif, including the aforementioned code and Rofi; the same thing happens with changing it to monospace.
How do I get this working?
Last edited by owm (2019-04-06 14:15:27)
Offline
<match> <edit mode="prepend" name="family"> <string>sans-serif</string> </edit> </match>
^ Remove this bit.
Jin, Jîyan, Azadî
Offline
That appear to have done it.
Thanks!
Offline
You're welcome.
Please add [SOLVED] to the thread title. And perhaps remove the capitalisation and add "Fontconfig alias:" at the beginning to make it a bit more descriptive.
Jin, Jîyan, Azadî
Offline