• [gentoo-user] Remove codepoints from fonts with fontconfig

    From tastytea@21:1/5 to All on Fri Sep 23 20:10:02 2022
    Hi,
    i added a colour emoji font as my last preferred font to fontconfig and
    want to get all emojis from it. The problem is, that my first preferred
    font contains some mono coloured emojis that override the colour emoji
    font. This is my config:

    <alias>
    <family>monospace</family>
    <prefer>
    <family>Source Code Pro</family>
    <family>Source Han Mono</family>
    <family>Noto Color Emoji</family>
    </prefer>
    </alias>

    and the same for serif and sans-serif[1].

    I tried to “remove” the offending codepoints from all fonts matching *Source* like this:

    <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> <!-- ❤ -->
    <int>0x1f916</int> <!-- 🤖 -->
    </charset>
    </minus>
    </edit>
    </match>

    but that only works partially. After running `fc-cache -f` the emojis
    are shown correctly in xfce4-terminal and GTK 2/3 programs but not in
    alacritty and Qt5 programs. Firefox gets only some of them right.
    Rebooting didn't help.

    Is there a way to make it work everywhere?

    [1] full config:
    <https://schlomp.space/tastytea/dotfiles/src/branch/main/.config/fontconfig/fonts.conf>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)