Bug 395233 - Truncated display of combining characters (decomposed text)
Summary: Truncated display of combining characters (decomposed text)
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: master
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-11 06:02 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2022-01-04 00:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: v21.08.0


Attachments
Script printing some combining characters (147 bytes, text/plain)
2018-06-11 06:02 UTC, Arfrever Frehtes Taifersar Arahesis
Details
Display with Konsole 18.04 (66.95 KB, image/png)
2018-06-11 06:07 UTC, Arfrever Frehtes Taifersar Arahesis
Details
Display with Konsole master branch (65.99 KB, image/png)
2018-06-11 06:09 UTC, Arfrever Frehtes Taifersar Arahesis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2018-06-11 06:02:19 UTC
Created attachment 113212 [details]
Script printing some combining characters

In Konsole 18.04.* (including last release 18.04.2), some combining characters are displayed in slightly wrong position, but they are not truncated, so they are still readable.

In Konsole master branch, some combining characters are truncated and unreadable.


This is regression from state after fix for bug #96536.


I attach a script which prints example text with combining characters.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2018-06-11 06:07:48 UTC
Created attachment 113213 [details]
Display with Konsole 18.04

This image shows not truncated display with Konsole 18.04.

E.g. for U+0361 (COMBINING DOUBLE INVERTED BREVE), the fully correct display would be as above first "kp" in this image from Wikipedia:
https://en.wikipedia.org/wiki/File:Character_tie.svg
(See also https://en.wikipedia.org/wiki/Tie_(typography) article.)
Comment 2 Arfrever Frehtes Taifersar Arahesis 2018-06-11 06:09:11 UTC
Created attachment 113214 [details]
Display with Konsole master branch

This image shows truncated display with Konsole master branch.
Comment 3 Christoph Feck 2018-06-27 22:58:57 UTC
Regression probably caused by https://cgit.kde.org/konsole.git/commit/?id=a565bc97337a3bfc3a027f46aa2dec3e9a6f8618
Comment 4 Mariusz Glebocki 2018-06-28 02:15:35 UTC
(In reply to Christoph Feck from comment #3)
> Regression probably caused by
> https://cgit.kde.org/konsole.git/commit/
> ?id=a565bc97337a3bfc3a027f46aa2dec3e9a6f8618

Correct.

The code renders combining characters with a previous character (as it should be), but due to a Qt bug combining characters appear above next character.
I'll look if it is possible to do some workaround for shifted combining characters. If not, rendering character on the right with combining characters will fix the bug.
Comment 5 Mariusz Glebocki 2018-07-11 04:33:46 UTC
I've made a partial fix, but it turns out the Qt bug is worse than I thought. Some combining characters (e.g. 0x0332-0x0338) are treated as regular characters. This causes (without current functionality which cuts them off) wrong position detection and rendering problems.

If I'll not find anything better, I'll filter out those problematic combining characters.