Skip to content

Instantly share code, notes, and snippets.

@Vicfred
Created June 4, 2025 02:53
Show Gist options
  • Save Vicfred/fc25ed78654bf1f90c2f292a7558e8c9 to your computer and use it in GitHub Desktop.
Save Vicfred/fc25ed78654bf1f90c2f292a7558e8c9 to your computer and use it in GitHub Desktop.
emoji support in gentoo alacritty zsh

✅ Step 1: Install Emoji Font

emerge media-fonts/noto-emoji

This gives you Noto Color Emoji, which supports full-color emoji rendering.


✅ Step 2: Configure Font Fallback via Fontconfig

Create or edit ~/.config/fontconfig/fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>Droid Sans Mono</family>
    <prefer>
      <family>Noto Color Emoji</family>
    </prefer>
  </alias>
</fontconfig>

Then reload the font cache:

fc-cache -fv

This tells Fontconfig to use Noto Color Emoji when Droid Sans Mono (your Alacritty font) doesn’t have the glyph.


✅ Step 3: Restart Alacritty

pkill alacritty && alacritty &

💪 Step 4: Test Emoji Support

In the terminal, run:

echo "Alacritty test: 🚀 🔥 🐧 ✅"

If emojis are showing correctly, you're done.


❗️ Optional: Use a Nerd Font Instead

Your current font Droid Sans Mono lacks many useful symbols (e.g. Powerline, devicons). You can switch to a Nerd Font:

emerge media-fonts/nerd-fonts

Then in your ~/.alacritty.toml, update:

[font.normal]
family = "JetBrainsMono Nerd Font"
style = "Regular"

Still use the same Fontconfig fallback to Noto Color Emoji.


Let me know if emojis still appear as boxes or grayscale — in that case, we can dig into COLRv1/CBLC rendering and your freetype, harfbuzz, or pango use flags.

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