dotfiles/.config/fontconfig/fonts.conf

79 lines
2.1 KiB
Plaintext
Raw Normal View History

2022-03-18 14:34:27 +01:00
<?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 4</family>
<family>Source Serif 3</family>
2022-03-18 14:34:27 +01:00
<family>Source Serif Pro</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Source Sans 3</family>
2022-03-18 14:34:27 +01:00
<family>Source Sans Pro</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
2022-07-27 15:55:43 +02:00
<!-- Add generic emoji family. -->
2022-07-28 13:10:38 +02:00
<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>
2022-07-28 13:10:38 +02:00
</match>
<!-- FIXME: Doesn't work -->
2022-07-28 13:10:38 +02:00
<!--
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:
-->
2022-07-28 13:10:38 +02:00
<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>
<!-- Exclude some glyphs from Source* font families -->
<match target="scan">
<test name="family" compare="contains">
<string>Source</string>
</test>
<edit name="charset" mode="assign" binding="same">
<minus>
<name>charset</name>
<charset>
<int>0x2764</int> <!-- red heart -->
<int>0x2615</int> <!-- hot beverage -->
<int>0x1f4a9</int> <!-- pile of poo -->
</charset>
</minus>
</edit>
2022-07-28 13:10:38 +02:00
</match>
2022-03-18 14:34:27 +01:00
</fontconfig>