🎉 Emoji on 🐧 Linux
I should have prepared this blog post on World Emoji Day when Google said farewell to its iconic ‘blob’ emoji typeface. Better late than never.
I’m not the biggest emoji fun, but even if I only use them rarely, I still want to see web pages as they were intended to be seen. By default on Linux one only sees a small number of black-and-white smileys. However, it is easy to setup your system to display all emojis in color.
During my short research, I stumbled upon few posts on how to set up emoji on Linux, but all of them were lengthy and suggested some incorrect setups. So I decided to sum up my experience in this super quick tutorial.
First of all, you need to choose a font. I prefer Noto Color Emoji, which is a font used to display emojis on Android. The font was recently updated with normal faces instead of old controversial blobs. But if you’ve been using Android since ages and like those, you always can install an older version of the same font. An alternative option would be an Emoji One font, which is also good, especially its third version.
Independently of which font you’ve chosen, put it in
Tell system you prefer this font to render emoji
Next, you need to create a file
~/.config/fontconfig/fonts.conf with following content:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <alias> <family>serif</family> <prefer> <family>Noto Color Emoji</family> </prefer> </alias> <alias> <family>sans-serif</family> <prefer> <family>Noto Color Emoji</family> </prefer> </alias> <alias> <family>monospace</family> <prefer> <family>Noto Color Emoji</family> </prefer> </alias> </fontconfig>
To apply new configuration, run
fc-cache -f -v in Terminal.
After you restart a browser (or any other app), you’ll see new emojis everywhere. If everything looks good, congratulations, you’re done! If you see new emojis, but still in black-and-white, read further.
(Optionally) Install modified font rendering library
On Ubuntu, most applications are built with GTK framework, which uses
cairo library to render text. It supports multi-color fonts, but this support is for some reason disabled by default. I uncommented the related line of code and published a package in a PPA. To install it run the following commands:
$ sudo add-apt-repository ppa:kropp/cairo-coloremoji $ sudo apt update && sudo apt upgrade
Restart your computer to apply changes.
Subscribe to all blog posts via RSS, follow me @kropp and join my Telegram channel.