Skip to content

Instantly share code, notes, and snippets.

@Vicfred
Created June 4, 2025 02:53
Show Gist options
  • Select an option

  • Save Vicfred/fc25ed78654bf1f90c2f292a7558e8c9 to your computer and use it in GitHub Desktop.

Select an option

Save Vicfred/fc25ed78654bf1f90c2f292a7558e8c9 to your computer and use it in GitHub Desktop.

Revisions

  1. Vicfred created this gist Jun 4, 2025.
    78 changes: 78 additions & 0 deletions gentoo_emoji_alacritty_zsh.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,78 @@
    ## ✅ Step 1: Install Emoji Font

    ```bash
    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
    <?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:

    ```bash
    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

    ```bash
    pkill alacritty && alacritty &
    ```

    ---

    ## 💪 Step 4: Test Emoji Support

    In the terminal, run:

    ```bash
    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:

    ```bash
    emerge media-fonts/nerd-fonts
    ```

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

    ```toml
    [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.