env/xdg-config-dir/fontconfig/fonts.conf

85 lines
2.2 KiB
XML

<?xml version="1.0" ?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
env
Written in 2021 by Lucas
CC0 1.0 Universal/Public domain - No rights reserved
To the extent possible under law, the author(s) have dedicated all
copyright and related and neighboring rights to this software to the
public domain worldwide. This software is distributed without any
warranty. You should have received a copy of the CC0 Public Domain
Dedication along with this software. If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<fontconfig>
<!-- change default fonts -->
<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
<family>M+ 1m</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>DejaVu Sans</family>
<family>M+ 1p</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>DejaVu Serif</family>
<family>M+ 1p</family>
</prefer>
</alias>
<!-- Emoji fallback -->
<match>
<test name="family"><string>monospace</string></test>
<edit name="family" mode="prepend">
<string>Noto Color Emoji</string>
</edit>
</match>
<match>
<test name="family"><string>sans-serif</string></test>
<edit name="family" mode="prepend">
<string>Noto Color Emoji</string>
</edit>
</match>
<match>
<test name="family"><string>serif</string></test>
<edit name="family" mode="prepend">
<string>Noto Color Emoji</string>
</edit>
</match>
<!-- whitelist bitmaps font -->
<selectfont>
<acceptfont>
<pattern>
<or>
<patelt name="family"><string>bitocra</string></patelt>
<patelt name="family"><string>Fixed</string></patelt>
</or>
</pattern>
</acceptfont>
</selectfont>
<!-- disable ligatures for monospace fonts -->
<!-- Inspired by https://github.com/agriffis/skel/blob/69211a82584bf1bf1bbd6f0817d8611a5d967bfc/fontconfig/.config/fontconfig/fonts.conf#L127 -->
<match>
<test name="family" compare="contains">
<string>monospace</string>
</test>
<edit name="fontfeatures" mode="append">
<string>calt off</string>
<string>clig off</string>
<string>dlig off</string>
<string>liga off</string>
</edit>
</match>
</fontconfig>