1

I am using CachyOS KDE (Arch Linux familiy) and I have a problem with emoji. There are fonts from coloured emoji uploaded to the system, but in the notification box not every one is coloured. There's an example in the screenshot. This is the case even after a fresh install of the system from scratch.

My screen

My fonts

Attached to the topic is a screen shot of the font I use on the system. For example, this emoji is not coloured in notifications "" but when I paste it into visual studio code or other editor it is coloured.

How can I fix this?

KDE Plasma 5.27.6

BuBu
  • 13
  • 3
  • The font substitution needs to be built into Discord. You'll have to ask them. – Tetsujin Jul 26 '23 at 08:59
  • I understand this is a problem with the discord app? But wait... that notification that pops up is a system notification. Without the discord overlay. – BuBu Jul 26 '23 at 09:02
  • Then possibly the system has a substitution issue too/instead. It's not something you're going to fix yourself. I have similar issues on an old Mac - it can do *most* emojis, but not any under 5 years old, whether I have the fonts or not. The system just doesn't know what to do with them. I'd have to update to a current version which fixes the subs [but I can't cos my hardware is obsolete.] This is different to app substitution, so it's tough to know where the failure is. – Tetsujin Jul 26 '23 at 09:17
  • 1
    Thank you for your willingness to help and for the information on this problem. – BuBu Jul 26 '23 at 09:19
  • Hello, this question is missing info - you should state what font you're using and also paste the characters that are failing, as text. To check/change font I assume this should be followed: https://userbase.kde.org/File:FontSettings.png – Destroy666 Jul 26 '23 at 12:55
  • Check this workaound https://gist.github.com/charveey/091b11ea554436d15c7fffcf01129a8a (ref https://bugs.kde.org/show_bug.cgi?id=436156) – Destroy666 Jul 26 '23 at 18:37
  • Also: https://aur.archlinux.org/packages/noto-color-emoji-fontconfig#comment-877756 Let me know if any of these work for you. – Destroy666 Jul 26 '23 at 18:47
  • A link from aur.archlinux.org got the job done. I had to do a system reboot afterwards and it works. Thanks to all of you for your help :) – BuBu Jul 26 '23 at 18:59

1 Answers1

0

The default font configs in Arch Linux don't support colored emojis too well. Apparently a direct issue is related to a Qt bug.

Assuming you have Noto Color Emoji font installed (if not, install it from this package), you can edit ~/.config/fontconfig/fonts.conf to include:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <alias>
  <family>serif</family>
  <prefer>
   <family>Noto Sans</family>
   <family>Noto Color Emoji</family>
  </prefer>
 </alias>
 <alias>
  <family>sans-serif</family>
  <prefer>
   <family>Noto Sans</family>
   <family>Noto Color Emoji</family>
  </prefer>
 </alias>
 <alias>
  <family>monospace</family>
  <prefer>
   <family>Noto Sans</family>
   <family>Noto Color Emoji</family>
  </prefer>
 </alias>
 <dir>~/.fonts</dir>
 <match target="font">
  <edit name="hinting" mode="assign">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit name="hintstyle" mode="assign">
   <const>hintslight</const>
  </edit>
 </match>
</fontconfig>

Source

Destroy666
  • 5,299
  • 7
  • 16
  • 35