Skip to content

Instantly share code, notes, and snippets.

@jfcherng
Last active October 16, 2023 09:48
Show Gist options
  • Save jfcherng/cbcffb71f0cdec9415d68bfeb9de9f19 to your computer and use it in GitHub Desktop.
Save jfcherng/cbcffb71f0cdec9415d68bfeb9de9f19 to your computer and use it in GitHub Desktop.
Ubuntu color emoji
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="scan">
<test name="family">
<string>Noto Color Emoji</string>
</test>
<edit mode="assign" name="scalable">
<bool>true</bool>
</edit>
</match>
<match>
<test name="family">
<string>sans-serif</string>
</test>
<edit binding="weak" mode="prepend" name="family">
<string>Noto Color Emoji</string>
</edit>
</match>
<match>
<test name="family">
<string>serif</string>
</test>
<edit binding="weak" mode="prepend" name="family">
<string>Noto Color Emoji</string>
</edit>
</match>
<match>
<test name="family">
<string>Ubuntu Mono</string>
</test>
<edit binding="weak" mode="prepend" name="family">
<string>Noto Color Emoji</string>
</edit>
</match>
<match>
<test name="family">
<string>Cascadia Mono</string>
</test>
<edit binding="weak" mode="prepend" name="family">
<string>Noto Color Emoji</string>
</edit>
</match>
<match>
<test name="family">
<string>Apple Color Emoji</string>
</test>
<edit binding="strong" mode="prepend" name="family">
<string>Noto Color Emoji</string>
</edit>
</match>
</fontconfig>

Goal

To use colored emoji in the terminal.

image

Steps

  1. Install colored emoji fonts.

    $ sudo apt install fonts-noto-color-emoji
  2. Edit font config.

    $ mkdir -p ~/.config/fontconfig/conf.d/
    $ mv -f 50-noto-color-emoji.conf ~/.config/fontconfig/conf.d/

    If you want to use color emoji over more font families, you can just copy and paste new sections in 50-noto-color-emoji.conf.

  3. Rebuild font caches.

    $ fc-cache -fv
  4. Re-login (or reboot).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment