Get Emojis Working On Arch Linux With Noto-fonts-emoji - DEV ...

After switching to arch linux as my daily driver I came across a new problem: I couldn't see emojis!

There are some emoji fonts you can install and setup. One of them is noto-fonts-emoji. I decided to write a small script to automate the setup of the font and explain the steps below:

#!/bin/sh set -e if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi echo "Setting up Noto Emoji font..." # 1 - install noto-fonts-emoji package pacman -S noto-fonts-emoji --needed # pacman -S powerline-fonts --needed echo "Recommended system font: inconsolata regular (ttf-inconsolata or powerline-fonts)" # 2 - add font config to /etc/fonts/conf.d/01-notosans.conf echo "<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <alias> <family>sans-serif</family> <prefer> <family>Noto Sans</family> <family>Noto Color Emoji</family> <family>Noto Emoji</family> <family>DejaVu Sans</family> </prefer> </alias> <alias> <family>serif</family> <prefer> <family>Noto Serif</family> <family>Noto Color Emoji</family> <family>Noto Emoji</family> <family>DejaVu Serif</family> </prefer> </alias> <alias> <family>monospace</family> <prefer> <family>Noto Mono</family> <family>Noto Color Emoji</family> <family>Noto Emoji</family> <family>DejaVu Sans Mono</family> </prefer> </alias> </fontconfig> " > /etc/fonts/local.conf # 3 - update font cache via fc-cache fc-cache echo "Noto Emoji Font installed! You may need to restart applications like chrome. If chrome displays no symbols or no letters, your default font contains emojis." echo "consider inconsolata regular" Enter fullscreen mode Exit fullscreen mode

The first part is to install the package noto-fonts-emoji. The parameter --needed is used to only download and install the package, if it's not already installed. The second part is just creating a config file and saving it. The third part with fc-cache is the refresh of the font cache.

I recommend Inconsolata Nerd Font Mono Regular or any other font without emojis as system font. If you see numbers as emojis in your Browser, it is likely that your current system font contains emojis itself (DejaVu is one example) and you need to switch to a different font so you get the colored emojis.

Update 20.02.2020

There is a much easier way and I edited this post to contain the new information. Before there was a bit trial and error to find out the number for the font config file. With the new way, it's just one file.

Tag » Arch I3 Missing Fonts