Summary: | Konsole does not show emojis correctly | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Iyán Méndez Veiga <me> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fanzhuyifan |
Priority: | NOR | Keywords: | qt6 |
Version: | 24.01.95 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/konsole/-/commit/dad9085e58ada8434cae24118c76e1f2d31a352a | Version Fixed In: | |
Attachments: |
Finish emoji from pdm not shown properly in Konsole
Emojis pasted from emoji selector shown as empty squares Konsole & Yakuake profiles Konsole with Noto Color Emoji Konsole profile weird font Complex Text Layout |
Created attachment 165743 [details]
Emojis pasted from emoji selector shown as empty squares
What font are you using for konsole? Could you provide a screenshot of konsole-edit current profile-appearance? You would need to select a font that supports emojis, like Noto Color Emoji If I select Noto Color Emoji, then the emoji works but also some normal characters like numbers are shown with emojis (I will attach a screenshot), so this font is not really usable. This issue I already had with Plasma 5.x and I put screenshots in the Matrix #Plasma room some time ago. I'm using Hack 10pt for the profile. For some reason, Yakuake takes the emojis from a font that includes them while Konsole cannot, even though both are using the same profile. Created attachment 165757 [details]
Konsole & Yakuake profiles
Created attachment 165758 [details]
Konsole with Noto Color Emoji
Ahh I think I know what is going on -- could you go to edit current profile -- appearance -- complete text layout and check what is selected for the emoji font? Exactly, that was it! I changed the "default" options (weird -1) to Noto Color Emoji and now everything works as expected. By the way, this also fixed the issue on my PC running Plasma 5.25.10. How could that setting got that weird value? The PC installation is quite recent, and in my laptop that I upgraded to Plasma 6 RC 2, I deleted the .config folder to have a "cleaner" experience. Created attachment 165759 [details]
Konsole profile weird font Complex Text Layout
So the problem is not with the apparent size of -1 -- it is with the code not correctly handling when to set a default emoji font. A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/955 Cool, nice catch! Thanks for fixing it so quick Git commit dad9085e58ada8434cae24118c76e1f2d31a352a by Kurt Hindenburg, on behalf of Yifan Zhu. Committed on 23/02/2024 at 01:11. Pushed by hindenburg into branch 'master'. terminalDisplay/TerminalFonts: fix checking if emojiFont is set QFont() constructs a font object that uses the application's default font. So testing if a font is set by comparing it against QFont() is not valid. Instead, test if the family name is empty. M +2 -2 src/terminalDisplay/TerminalFonts.cpp https://invent.kde.org/utilities/konsole/-/commit/dad9085e58ada8434cae24118c76e1f2d31a352a |
Created attachment 165742 [details] Finish emoji from pdm not shown properly in Konsole SUMMARY Konsole does not show emojis correctly, while Yakuake does using the same profile and fonts STEPS TO REPRODUCE 1. Open emoji selector (Super + .) and copy any emoji 2. Paste in Konsole and Yakuake OBSERVED RESULT Yakuake shows all emojis correctly. It also show emojis printed by applications (e.g. pdm). Konsole also shows empty squares (see attached screenshots) EXPECTED RESULT Konsole should work just as fine as Yakuake SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.93.0 KDE Frameworks Version: 5.249.0 Qt Version: 6.7.0 Kernel Version: 6.7.4-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz Memory: 15.3 GiB of RAM Graphics Processor: Mesa Intel® Xe Graphics Manufacturer: LENOVO Product Name: 20XYCTO1WW System Version: ThinkPad X1 Yoga Gen 6