Categories: 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

Reviving a Roland SoundBrush: Floppy MIDI Playback Without the Computer

Back in the 80s and early 90s, when games often came on floppy disks, the…

2 weeks ago

A Socket 7 Upgrade: Moving Beyond the 486

A while back I built a 486-based machine to play with some late 80s /…

2 weeks ago

Reviving an Amiga 600: From Dead Video to a Clean Boot

I managed to score an Amiga 600 motherboard which was faulty for £41. This weekend…

1 month ago

The Amiga 1200 That Fought Back: The Faults I Missed the First Time

I recently repaired an Amiga 1200 with a difficult to find fault. Unfortunately, it came…

1 month ago

Why Recapping Isn’t Always the Cure: And Amiga 1200 Repair Story

I often see on places such as Facebook that an Amiga owner will show a…

2 months ago

KDE Plasma Automatic Time Zone

I have been a full time KDE Plasma user for quite a while now. Whilst…

2 months ago