Linux

Rendering Emoji in Linux Terminals

Following on from my post about getting TUIs in CentOS 7 to use Unicode I thought I should write a short piece on how to actually get those characters to render in Linux terminals.

Many Linux distributions have a font in their repositories that supports Unicode characters which is part of the “Noto” font group, but this sometimes isn’t installed by default, or not set up to replace the missing emoji in other fonts. So, the first step is installing it. In Ubuntu you want to install “fonts-noto-color-emoji” using apt and in Fedora and CentOS this is “google-noto-emoji-fonts” using dnf or yum.

You may find when you restart your terminal after this that emoji characters “just work”. But if they don’t you need to set up these as fallbacks for when the characters are missing. To do this you need to create the file ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf (you may need to create the directory too) and add the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="pattern">
    <test qual="any" name="family"><string>monospace</string></test>
    <edit name="family" mode="append" binding="strong">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
</fontconfig>

For this to take effect you will need to run fc-cache -vf and restart your terminal application. You can now see and use emoji in your favourite terminal application!

LinuxJedi

Recent Posts

Upgrading the RAM Detective: A Firmware Adventure with RAMCHECK

The firmware in my RAMCHECK is very old, there were many updates since then. Unfortunately,…

3 weeks ago

The Ultimate RAM Detective: Meet the Innoventions RAMCHECK

Whilst repairing vintage machines, a lot of RAM passes by my benches. Most of it…

1 month ago

Vintage Speed Demon: Fixing an ARK1000VL Graphics Card

According to some, the ARK1000VL is considered the fastest VLB graphics card chip you can…

2 months ago

Using rr On Newer Intel CPUs

If, like me, you have a newer Intel hybrid CPU, with P-Cores and E-Cores, you…

2 months ago

The Legend Continues: Amiga 1000 Keyboard Revival

I have restored the boxed Amiga 1000 main unit and the mice that came with…

2 months ago

Amiga 4000 Repair: This one was just weird

I was recently sent an Amiga 4000 motherboard repair. It should have been quite straightforward,…

2 months ago