Bug 491417 - Emojis in file names are displayed in black and white or as tofu
Summary: Emojis in file names are displayed in black and white or as tofu
Status: RESOLVED UPSTREAM
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 24.05.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-08 02:58 UTC by LaughingMan
Modified: 2024-08-09 23:21 UTC (History)
4 users (show)

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


Attachments
Correct display (Nemo, top) and incorrect display (Dolphin, bottom) (20.50 KB, image/png)
2024-08-08 02:58 UTC, LaughingMan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LaughingMan 2024-08-08 02:58:08 UTC
Created attachment 172387 [details]
Correct display (Nemo, top) and incorrect display (Dolphin, bottom)

As the title says. Uses the expected font in Nemo or Konsole (ls). Window titles (such as from Firefox) are also affected.

STEPS TO REPRODUCE
1. Create a file named "🗺️🗺🤔😈.txt"
2. View the folder containing said file with Dolphin

OBSERVED RESULT
The file name is displayed as "{BLACKNWHITEMAP}{BLACKNWHITEMAP}{TOFU}{BLACKNWHITEDEVIL}.txt"
(See attached image)

EXPECTED RESULT
The file name is displayed as "{COLORMAP}{BLACKNWHITEMAP}{THINKING}{COLORDEVIL}.txt"
(See attached image)

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Comment 1 Vinícius 2024-08-08 18:38:22 UTC
i can confirm dolphin showing the black and white emoji, and Konsole showing the emoji fine(except in the wndows title) 

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.3-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700U with Radeon Graphics
Memory: 7,1 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: 82MF
System Version: IdeaPad 3 15ALC6
Comment 2 fanzhuyifan 2024-08-09 02:07:56 UTC
Cannot reproduce in dolphin 24.07.80, arch linux. The name of the file 🗺️🗺🤔😈.txt is displayed in color.

I think the issue indicates some downstream configuration issues in the local font config -- a font showing the colored emojis need to be installed and correctly configured. (I am using https://aur.archlinux.org/cgit/aur.git/tree/75-noto-color-emoji.conf?h=noto-color-emoji-fontconfig-no-binding)
Comment 3 LaughingMan 2024-08-09 02:17:19 UTC
If it was a case of missing or misconfigured font, why do both Nemo and Konsole manage to pick the correct one?
Comment 4 Vinícius 2024-08-09 02:42:24 UTC
(In reply to LaughingMan from comment #3)
> If it was a case of missing or misconfigured font, why do both Nemo and
> Konsole manage to pick the correct one?

yep, how can i share the font configs?

btw i tested in a fresh fedora iso and the issue is there, konsole shows emoji file, but dolphin don't
Comment 5 fanzhuyifan 2024-08-09 16:56:08 UTC
(In reply to LaughingMan from comment #3)
> If it was a case of missing or misconfigured font, why do both Nemo and
> Konsole manage to pick the correct one?

Konsole has special handling of emoji fonts, but dolphin does not.

For more info on how to set up the font config, I would suggest asking for help in the distro forums, and/or checking out posts online like https://www.reddit.com/r/linuxquestions/comments/dap511/arch_linux_apps_not_displaying_emojis_correctly/ or https://github.com/alacritty/alacritty/issues/3686
Comment 6 Vinícius 2024-08-09 17:35:15 UTC
(In reply to LaughingMan from comment #3)
> If it was a case of missing or misconfigured font, why do both Nemo and
> Konsole manage to pick the correct one?

btw i fixed that following the ngraham comment here https://pagure.io/fedora-kde/SIG/issue/194
Comment 7 LaughingMan 2024-08-09 23:19:35 UTC
Alright, reading though those links you two posted there appears to be a consensus that fiddling with fontconfig is a hack and people are working on adding proper support to Qt. Dolphin relies on Qt, while Nemo and Konsole are non-Qt applications and thus don't suffer from this bug.

I'd call that an upstream and not a downstream problem, but whatever. That's for linking the relevant issues.