Bug 505467

Summary: Using Icons-and-text Task Manager, when program has emoji in title, plasma will break title into two lines
Product: [Plasma] plasmashell Reporter: Roman <roman>
Component: Task Manager and Icons-Only Task Manager widgetsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: cwo.kde, kdedev, nate, qydwhotmail
Priority: NOR    
Version First Reported In: 6.3.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: line break on taskbar item
screenshot showing IATTM with letter "o" on its own line
broken titles on 44 panel height

Description Roman 2025-06-11 10:28:00 UTC
Created attachment 182182 [details]
line break on taskbar item

SUMMARY
Using Icons-and-text Task Manager, when program has emoji in title, plasma will break title into two lines

STEPS TO REPRODUCE
1. Use Icons-and-text Task Manager
2. Open firefox and go to website with emoji in title, i.e. https://emojipedia.org/person-shrugging
3. Look at that firefox instance task on taskbar

OBSERVED RESULT
Title has line break after emoji, making task name into two lines

EXPECTED RESULT
Task names should always be on one line (?)

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.1
Kernel Version: 6.14.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-9700K CPU @ 3.60GHz
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4070
Comment 1 cwo 2025-06-12 07:01:46 UTC
Created attachment 182212 [details]
screenshot showing IATTM with letter "o" on its own line

Icons-and-Text task manager will put things onto multiple rows depending on the word wrap algorithm. I can get it to display two lines even without an emoji, see the attached screen shot.

I guess it's a bit easier to see with emoji, as each of them is considered a single word, so the word-wrapping might work in cases where it would otherwise give up.

If you reduce the size of the panel a bit, does it still happen?
Comment 2 Roman 2025-06-12 07:53:11 UTC
My panel height is 42. I need to go down to 36 for my example with emoji to be one line. On the other hand 44 is even worse - titles get broken down to two lines in middle of words, see screenshot.
Comment 3 Roman 2025-06-12 07:53:39 UTC
Created attachment 182216 [details]
broken titles on 44 panel height
Comment 4 Nate Graham 2025-06-12 16:02:43 UTC
Can also reproduce. Not really broken, just word-wrapped oddly. We could change the wrap algorithm to allow wrapping in the middle of words (Text.WrapAnywhere), but I suspect it might simply annoy other people.

Still, the result would be more compact and display more text, which is probably what people using thick panels with an icons-and-text task manager want. Might be worth trying.
Comment 5 Bug Janitor Service 2025-06-12 16:06:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3067
Comment 6 Nate Graham 2025-06-13 19:10:55 UTC
I'm afraid we weren't able to come up up with a change for this that wouldn't make other things even worse.
Comment 7 Roman 2025-06-16 12:06:02 UTC
I would think the correct solution is "if the panel is too narrow for 2 lines (under 44), never break line"? It's like that with text - I can have really long text titles and they are always single line, with 3 dots. It's only different with emoji, and I see no reason to be different than pure text. But not like it's big deal.