# Twemoji emojis don't display in some apps

**URL:** https://discourse.nixos.org/t/twemoji-emojis-dont-display-in-some-apps/54879
**Category:** Help
**Created:** [October 24, 2024, 4:49pm UTC](https://discourse.nixos.org/t/twemoji-emojis-dont-display-in-some-apps/54879 "2024-10-24T16:49:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![maksim](https://discourse.nixos.org/user_avatar/discourse.nixos.org/maksim/32/27064_2.png) [@maksim](https://discourse.nixos.org/u/maksim)
#### Post date: [October 24, 2024, 4:49pm UTC](https://discourse.nixos.org/t/twemoji-emojis-dont-display-in-some-apps/54879/1 "2024-10-24T16:49:16Z")

</div>

I configured the following with home-manager:

```auto
{
    fonts.fontconfig = {
        enable = true;
        defaultFonts.emoji = [
            "Twitter Color Emoji"
        ];
    };
}

```

And installed the `twemoji-color-font` package. However, I still don’t see emojis in alacritty. If I understood that correctly, the code block above should enable Twemoji emojis everywhere, at least that’s how it worked on Arch Linux. That doesn’t happen though.

---

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [October 25, 2024, 12:53pm UTC](https://discourse.nixos.org/t/twemoji-emojis-dont-display-in-some-apps/54879/2 "2024-10-25T12:53:53Z")

</div>

There are multiple [color font formats](https://www.colorfonts.wtf/) with different level of support by different toolkits. To avoid the package size blowing up, we have `twemoji-color-font` containing `SVG` table and `twitter-color-emoji` with `CBDT`. Not sure about Alacrity specifically but most Linux GUI programs need `CBDT`.

---

<div class="post-metadata">

### Author: ![maksim](https://discourse.nixos.org/user_avatar/discourse.nixos.org/maksim/32/27064_2.png) [@maksim](https://discourse.nixos.org/u/maksim)
#### Post date: [October 26, 2024, 4:35pm UTC](https://discourse.nixos.org/t/twemoji-emojis-dont-display-in-some-apps/54879/3 "2024-10-26T16:35:26Z")

</div>

I’ve been trying to debug this issue for a couple of hours:

This issue goes beyond just alacritty, but also other apps, like dmenu. Just to test I tried different ones.

The config I had previously doesn’t work, because for some reason it doesn’t write any files. So I set Twitter Color Emoji to be the emoji font systemwide, in configuration.nix. Now I see emojis properly in GTK apps, rofi and Zathura. Dmenu and alacritty don’t show emojis (it’s just blank) and kitty shows black and white emojis, instead of colored ones.

If I keep the configuration for Twemoji to be the system font but remove the twemoji-color-font package alacritty has black and white emojis, kitty has noto emojis, dmenu has black and white emojis and rofi has noto emojis. I would guess all of that is set as a fallback.

If we have the font installed some apps do show twemojis and some don’t. Probably because some apps render them properly and some don’t, resulting in blank space.

The problem is that emojis used to work everywhere on Arch Linux, using the [ttf-twemoji-color package](https://aur.archlinux.org/packages/ttf-twemoji-color). so it shouldn’t be an issue with a specific application.

If we look inside of the [PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-twemoji-color), we will see what it does. Basically, it pulls a [.tar.gz archive from github](https://github.com/13rac1/twemoji-color-font/releases/tag/v15.1.0), installs the ttf font (which differs from the one NixOS uses now, judging by a simple diff) and installs a fontconfig rule to /usr/share/fontconfig/conf.avail/46-ttf-twemoji-color.conf.  
I tried to replicate that: installed the ttf to ~/.local/share/fonts/ and the rule via using [`fonts.fontconfig.localConf`](https://search.nixos.org/options?channel=24.05&show=fonts.fontconfig.localConf&from=0&size=50&sort=relevance&type=options&query=fonts.fontconfig.localConf) in configuration.nix. That results in dmenu showing blank space, alacritty showing blank space, rofi and zathura showing twemojis, kitty showing black and white emojis.

---

<div class="post-metadata">

### Author: ![maksim](https://discourse.nixos.org/user_avatar/discourse.nixos.org/maksim/32/27064_2.png) [@maksim](https://discourse.nixos.org/u/maksim)
#### Post date: [October 26, 2024, 4:55pm UTC](https://discourse.nixos.org/t/twemoji-emojis-dont-display-in-some-apps/54879/4 "2024-10-26T16:55:51Z")

</div>

UPD: Seems like alacritty (and most likely other tested apps) don’t just show black and white emojis. Now, without twitter-color-emoji installed alacritty shows some colored noto emojis, some, however, are black and white
