dotfiles/.config/fontconfig/fonts.conf

54 lines
1.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Set default fonts -->
<alias>
<family>monospace</family>
<prefer>
<family>Source Code Pro</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Source Serif Pro</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Source Sans Pro</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<!-- Add generic emoji family. -->
<match target="pattern">
<test qual="any" name="family"><string>emoji</string></test>
<edit name="family" mode="assign" binding="same"><string>Noto Color Emoji</string></edit>
</match>
<!--
If other fonts contain emoji glyphs, they could interfere and make some emojis rendered in wrong font (often in black-and-white).
For example, DejaVu Sans contains black-and-white emojis, which we can remove using the following trick:
-->
<match target="scan">
<test name="family" compare="contains">
<string>DejaVu</string>
</test>
<edit name="charset" mode="assign" binding="same">
<minus>
<name>charset</name>
<charset>
<range>
<int>0x1f600</int>
<int>0x1f640</int>
</range>
</charset>
</minus>
</edit>
</match>
</fontconfig>