[Tip] Enable Colour Emojis

EndeavourOS, out of the box, does not come with colourful TTF emojis installed. For example, KDE’s Emoji Selector application displays a bunch of □-like characters instead of emojis.

However, it is fairly easy get it working. While I’m sure most users already know how to do this, just in case there is a newbie looking for a simple tutorial, I hope this helps.

First, install an emoji font. A good choice is noto-fonts-emoji from the repos, but if you want the same look of emojis as here on Discourse, an even better emoji font is ttf-twemoji available in the AUR:

yay ttf-twemoji

Next, create a directory fontconfig inside ~/.config:

mkdir ~/.config/fontconfig

Inside that directory create a file named fonts.conf with the following contents (this is if you are using Noto Fonts as the default fonts in your DE, and installed Twemoji as instructed above, if not, adjust according to your specific circumstances):

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <alias>
   <family>sans-serif</family>
   <prefer>
     <family>Noto Sans</family>
     <family>Twemoji</family>
     <family>Noto Color Emoji</family>
     <family>Noto Emoji</family>
   </prefer> 
 </alias>

 <alias>
   <family>serif</family>
   <prefer>
     <family>Noto Serif</family>
     <family>Twemoji</family>
     <family>Noto Color Emoji</family>
     <family>Noto Emoji</family>
   </prefer>
 </alias>

 <alias>
  <family>monospace</family>
  <prefer>
    <family>Noto Mono</family>
    <family>Twemoji</family>
    <family>Noto Color Emoji</family>
    <family>Noto Emoji</family>
   </prefer>
 </alias>
</fontconfig>

Log out and log back in, and now you should be able to use emojis in applications like KDE’s Emoji Selector, Konsole, Kate, etc… :frog:

17 Likes

Thanks for the nice tutorial, but pls can i seek clarification on this point?

In all my installations my preferred default font is Lato. Afaik [maybe incorrectly] Lato has no native emojis, so were i to merely substitute Lato for Noto above, nothing useful would result for me… is that correct or only my fundamental misunderstanding of the issue?

I’ve kinda sorta wondered about this for a couple of years but never really bothered investigating because tbh i see no use-case for my Plasma itself to have functional emojis [i only use them in certain nix fora, which already provide emojis, obviously]. Ta.

Ah yes, good point. You can use any font as default, and still use Noto Colorsic! Emoji for emojis:

For example, for sans-serif family, if you use something like Helvetica, you’d put:

 <alias>
   <family>sans-serif</family>
   <prefer>
     <family>Helvetica</family>
     <family>Noto Color Emoji</family>
     <family>Noto Emoji</family>
   </prefer> 
 </alias>

And similarly for other two families (serif and monospace).

In all cases, the second entry is always “Noto Color Emoji” (if that’s your emoji font of choice) and the third entry is “Noto Emoji” (just in case you need the non-coloured one).

1 Like

Ta. Now pls bear with me once more.

In case i am completely missing the bigger picture here, just how do you use Plasma’s emojis in your daily pooterising? They’re unnecessary in browsers as mentioned above, so… what? I reckon the last time i needed to insert any emoji in a spreadsheet or document would have been three Halley’s Comet circuits back.

1 Like

For example, did you know that this is completely valid C++ code that the GNU C++ compiler (g++) won’t complain about in the slightest:
image

So yes, a very absurd example, but one that illustrates well how you can use emojis in whatever way you like. :rofl:

(Just because you can, does not mean you should.)

Perhaps a better example would be in a Rofi menu, or dmenu. Or inside text files (for example when writing notes and journals). You can even use them in filenames (though why would you in practice, it’s yet unclear, it may make your life a bit more difficult).

Personally, I like to use the :frog: emoji as my prompt in ZSH.

4 Likes

That’s massively impressive, but i can only shake my head & whisper

I’m not the droid you’re looking for.

1 Like

Also, they are not entirely unnecessary in browsers. For example, if you want an emoji in a Youtube comment or on Stack Overflow, that’s not trivial without a tool like KDE Emoji Selector.

Forum software, like Discourse, displays emojis as HTML images, so you don’t need any font support to see them. But that’s not universally true.

1 Like

Great tip thanks. Works perfectly, all emoji are now displayed correctly

1 Like

Edited the OP to include ttf-twemoji, as this is the font containing the emojis identical to those on this forum (Twitter-style).

2 Likes

I installed ttf-dejavu-emijiless from AUR and it works perfectly for all emojies :innocent:

Well that was on browsers . Installed noto-fonts-emoji and everything works .