fontconfig: Update font config

Taken from
https://schlomp.space/tastytea/dotfiles/src/branch/main/.config/fontconfig/fonts.conf
This commit is contained in:
Sanchayan Maity 2023-01-14 19:31:00 +05:30
parent 6340486b46
commit 19adc209b4
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -1,18 +1,83 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "/usr/share/xml/fontconfig/fonts.dtd">
<fontconfig>
<alias>
<!-- Set default fonts -->
<alias>
<family>monospace</family>
<prefer>
<family>JetBrains Mono</family>
<default>
<family>monospace</family>
</default>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>JetBrains Mono</family>
<family>Hack</family>
</prefer>
</alias>
</fontconfig>
<family>Hack</family>
<family>Source Code Pro</family>
<family>Noto Color Emoji</family>
<family>Font Awesome 6 Free</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Noto Serif</family>
<family>DejaVu Serif</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>
<!-- 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>0x203c</int> <!-- ‼ -->
<int>0x2049</int> <!-- ⁉ -->
<int>0x2611</int> <!-- ☑ -->
<int>0x2615</int> <!-- ☕ -->
<int>0x263a</int> <!-- ☺ -->
<int>0x2640</int> <!-- ♀ -->
<int>0x2642</int> <!-- ♂ -->
<int>0x2665</int> <!-- ♥ -->
<int>0x2713</int> <!-- ✓ -->
<int>0x2714</int> <!-- ✔ -->
<int>0x2764</int> <!-- ❤ -->
<int>0x1f4a9</int> <!-- 💩 -->
<int>0x1f916</int> <!-- 🤖 -->
</charset>
</minus>
</edit>
</match>
</fontconfig> <!-- vim: set ts=2 sw=2 et tw=80 ft=xml: -->