DEV Community

Cover image for Get emojis working on arch linux with noto-fonts-emoji

Get emojis working on arch linux with noto-fonts-emoji

Robin Kretzschmar on January 07, 2020

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 an...
Collapse
 
thepbone profile image
Tim Schneeberger • Edited

Great post!
But I noticed that <?xml version="1.0"?> evaluates to <?xml version=1.0?> (in zsh) which causes a syntax error when running fc-cache.
The same thing happens for <!DOCTYPE fontconfig SYSTEM "fonts.dtd">. Escaping the double quotes fixes this.

Collapse
 
darksmile92 profile image
Robin Kretzschmar

Thanks Tim, good point! Maybe I should mention that in the post :)

Collapse
 
marchingon12 profile image
Austin Hornhead

I believe changing double quotes to single quotes would avoid the error from coming up. Other than that, the script is great! I've been trying to do smth like this for some time now, so thank you for writing this!

Collapse
 
nbelakovski profile image
nbelakovski

Thanks for this!

I was able to get it to work by putting the local.conf file into ~/.fonts and running fc-cache without sudo. The only need for sudo is to install the package. Of course putting the file into ~/.fonts will only work for the local user, I just try to avoid sudo when I can.

Collapse
 
abracwan profile image
Chris Abraham

Do you know how I could get this script working with Twitter Emoji Color (aka twemoji)?

I replaced all lines with <family>Noto Color Emoji</family> with <family>Twitter Color Emoji</family>, but it didn't work.

Collapse
 
thediamondcg profile image
Diamond

Go into whatever your font management application is for your DE, and then search for the font's name. Whatever name shows up in the font manager is the name that you have to use in the section. It's how I found out to use JoyPixels for my emojis.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

It works better then ArchWiki itself.

However, it destroyed my Conkies. I have to tweak them a bit.

Lastly, > /etc/fonts/local.conf is dangerous. You should either use a text editor or backup first.

I would also consider using fc-cache -v, instead of fc-cache.

Almost perfect

Actually, only ALMOST perfect.

Collapse
 
otaviocapila profile image
Otávio Capila • Edited

How do i revert this? My fonts seems weird now,with a lot of space between each word :/

Collapse
 
darksmile92 profile image
Robin Kretzschmar • Edited

The easiest way would be if you have a backup of your /etc/fonts/local.conf file or didn't had this file at all before!
In that case, either restore the backup file or delete the /etc/fonts/local.conf file completely and run fc-cache.

In case you have no backup and had customizations in that file before, open it with an editor and remove all lines containing the emoji font (in this case e.g. Noto...). Save and run fc-cache.

Collapse
 
otaviocapila profile image
Otávio Capila

Oh, thanks!

Thread Thread
 
darksmile92 profile image
Robin Kretzschmar • Edited

you're welcome ☺️ Did it work?

Thread Thread
 
otaviocapila profile image
Otávio Capila

Worked perfectly!

Thread Thread
 
darksmile92 profile image
Robin Kretzschmar

Nice 👍

Collapse
 
athithyanrj profile image
Athithyan

worked perfectly!

Collapse
 
sarbash profile image
Sergey Sarbash

Thanks a lot! Helped on Debian Bookworm.
I little tweaked it for my own needs and it works perfectly.
Now, KDE shows emojis within the Clipboard Manager. 👍

Collapse
 
m_gomathi_b9e561974ebe880 profile image
M Gomathi

Emoji