How to get colour emojis on Linux

how to ricing

One thing that has been bugging me recently is that the colour emojis are not shown properly on my Linux install. For example, see how rofi renders my emojis.

Before applying the fix

Since I use colour images everywhere on my system, dwm and lf for example, it makes everything look inconsistent. It turns out that the fix involved simply enabling a couple of fontconfig configurations which are shipped with most distros nowadays, namely 45-generic.conf and 60-generic.conf placed in /usr/share/fontconfig/conf.avail. Apart from these files, you’ll also want to enable 10-scale-bitmap-fonts.conf which scales the emojis properly.

To enable them, just symlink these files to /etc/fonts/conf.d or your local fontconfig directory which is usually ~/.config/fontconfig/conf.d:

sudo ln -s /usr/share/fontconfig/conf.avail/{45,60}-generic.conf /etc/fonts/conf.d/
sudo ln -s /usr/share/fontconfig/conf.avail/10-scale-bitmap-fonts.conf /etc/fonts/conf.d/

After doing this, rofi started displaying the emojis correctly.

After applying the fix

In the images shown above, rofi-emoji script has been used. Also, just for completeness’ sake, here are the fontconfig config files: 45-generic.conf, 60-generic.conf, and 10-scale-bitmap-fonts.



Nothing yet.

Leave a reply