Bug 414628 - Add support for UTF8 Emoji characters in kate
Summary: Add support for UTF8 Emoji characters in kate
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-28 17:37 UTC by Martin
Modified: 2019-12-02 20:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 2019-11-28 17:37:58 UTC
Goal: Display Emoji UTF8 characters such as 🧲 in kate 

STEPS TO REPRODUCE
1. Install font for Emoji characters (Noto on my machine, from package fonts-noto-color-emoji)
2. Open a text file with Emoji UTF8 characters

OBSERVED RESULT
The characters are not displayed, there is a blank square instead.

NOTES:
The emojis are well displayed in the console (terminator) and in other editors (gedit). 

SOFTWARE/OS VERSIONS
Linux Debian SID
Kate: 4:19.08.2-1
Comment 1 Kåre Särs 2019-11-28 17:49:50 UTC
Have you also selected the Noto font in Kate? I'm using the Hack font in NEON (ubuntu 18.04 + latest KDE packages) and I can see the emoji...
Comment 2 Martin 2019-12-01 19:28:23 UTC
Thanks Kåre.

If I select "Noto Color Emoji" as default font, the emojis are displayed but the normal letters are ugly.

Since NotoColorEmoji.ttf does not contain letters, where are taken the letter characters?
Comment 3 Kåre Särs 2019-12-02 17:57:11 UTC
There is a fallback mechanism that tries fonts until there is a font that contains the needed character. This priority order is set by the system, and nothing Kate can influence. The font fallback priority order is probably modifiable in the systems font configuration, but I have not investigated how to change it.
Comment 4 Martin 2019-12-02 18:01:17 UTC
> There is a fallback mechanism that tries fonts until there is a font that contains the needed character.

Interesting. The question is then why the Noto Color Emoji is not considered as fallback when 🧲 is not found in the standard font.

Any pointer on how to debug this fallback order would be super useful.
Comment 5 Kåre Särs 2019-12-02 18:16:13 UTC
Unfortunately I don't know anything more than what you get by googling for font-substitution, fallback fonts and fontconfig
Comment 6 Martin 2019-12-02 20:29:53 UTC
What's strange is that other apps (terminator, gedit) have a correct fallback for emojis. The problem is specific to kate (or maybe KDE apps), I guess it uses fontconfig differently.