Bug 381593 - Fonts space incorrect when typing ligature marks (Hindi, Sanskrit, Bangla)
Summary: Fonts space incorrect when typing ligature marks (Hindi, Sanskrit, Bangla)
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: font (show other bugs)
Version: 15.12.3
Platform: Ubuntu Linux
: NOR grave
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-23 21:45 UTC by mobile.jaduwala@gmail.com
Modified: 2024-04-25 03:46 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The cursor is offset too much from the end of the Bengali text (4.84 KB, image/png)
2022-04-09 08:05 UTC, Puspam Adak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mobile.jaduwala@gmail.com 2017-06-23 21:45:57 UTC
REGARDING
Terminal emulator, (c) 1997-2015, The Konsole Devein KONSOLE terminal , Using: KDE Frameworks 5.18.0, Qt 5.5.1 (built against 5.5.1), The xcb windowing system

ISSUE
When typing using Devanagari Font Space
(a) When typing an all consonant things are fine 
(b) When a diacritic is typed the space taken for fonts is less than two characters as the diacritic is added to the existing alphabet like a ligature mark.
(c) The fault is the distance between end current end of line and the visible caret mark is incorrect It is as much as if two English alphabets were typed.
---------------------------------
The bug also shows with other scripts with ligature marks I tested with Bengali, Hindi, Sanskrit Keyboards and the error shows in all
Comment 1 Kurt Hindenburg 2017-06-25 21:55:23 UTC
You are using a somewhat old version.  Do you have a simple way of testing the issue and screenshots?
Comment 2 G Karunakar 2017-09-15 19:52:38 UTC
I don't have latest version (still on 4.x) but none of consoles - either text mode or in X/Desktops support displaying Indian languages properly. This is case with all terminal emulators in Linux desktops.
This require some change in semantics of terminal emulation and rendering to properly show complex text characters.
Comment 3 Puspam Adak 2022-04-09 08:03:49 UTC
Affects the latest version of Konsole too (version 21.12.3). Please find some screenshots attached.
Comment 4 Puspam Adak 2022-04-09 08:05:42 UTC
Created attachment 148063 [details]
The cursor is offset too much from the end of the Bengali text
Comment 5 Matan Ziv-Av 2022-04-09 16:44:18 UTC
(In reply to Puspam Adak from comment #4)
> Created attachment 148063 [details]
> The cursor is offset too much from the end of the Bengali text

Can you please include the exact character string that is displayed in the image, and which font you use?

I see something similar when I use Hebrew characters with a font that has no such characters, and fontconfig uses characters from another font with a different width.

I guess that the solution is to display the characters in their place, one a t a time, instead of using drawText to draw multiple characters at a time.
Comment 6 Puspam Adak 2022-04-17 07:35:41 UTC
> Can you please include the exact character string that is displayed in the image
চলে যেতে যেতে দিন বলে যায়
> which font you use?
Source Code Pro

> I guess that the solution is to display the characters in their place, one a
> t a time, instead of using drawText to draw multiple characters at a time.
You are right. I can see that the Bengali characters are not placed on separate blocks even when they are not joined (for example Bengali digits).
Comment 7 Bug Janitor Service 2022-08-06 18:51:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/722
Comment 8 Kurt Hindenburg 2022-08-27 01:10:08 UTC
Git commit 76f879cd70fb494ab2334d2660b34679546f3d9d by Kurt Hindenburg, on behalf of Matan Ziv-Av.
Committed on 26/08/2022 at 19:24.
Pushed by hindenburg into branch 'master'.

Draw characters in exact positions

QT can't be made to draw monospaced text (if the font does not cooperate),
so avoid combining characters, using a QPainter::drawText() call for each
character.

For bidi text support this change requires konsole to reorder and reshape
the characters. This is done using the ICU library (which QT also uses).

This change allows for some improvements related to text rendering:

- More precise bidi reordering, which is no longer changed by characters'
  attributes and selection.
- underlines drawn separately from the text, allowing for differing
  underline modes (double, curly, dashed, dotted, colored).
- Overriding font for emoji characters.

This commit fixes a few bugs and addresses a lot more:

Feature requests: More standard conforming RTL and various underlines:
Related: bug 403729, bug 387811, bug 416508, bug 452087, bug 425973, bug 430822, bug 442742, bug 441037, bug 430822, bug 440070, bug 450017, bug 445846, bug 453086, bug 451716

Using non-monospace font:



Emoji:

Regression: devanagari rendering

M  +2    -0    CMakeLists.txt
M  +1    -0    src/CMakeLists.txt
M  +47   -25   src/FontDialog.cpp
M  +2    -1    src/FontDialog.h
M  +127  -23   src/Screen.cpp
M  +18   -5    src/Screen.h
M  +28   -13   src/Vt102Emulation.cpp
M  +0    -29   src/autotests/CharacterTest.cpp
M  +0    -1    src/autotests/CharacterTest.h
M  +1    -1    src/autotests/TerminalCharacterDecoderTest.cpp
M  +119  -29   src/characters/Character.h
M  +1    -1    src/characters/Hangul.cpp
M  +5    -4    src/decoders/HTMLDecoder.cpp
M  +1    -1    src/decoders/PlainTextDecoder.cpp
M  +3    -0    src/profile/Profile.cpp
M  +29   -0    src/profile/Profile.h
M  +101  -6    src/terminalDisplay/TerminalDisplay.cpp
M  +7    -0    src/terminalDisplay/TerminalDisplay.h
M  +42   -0    src/terminalDisplay/TerminalFonts.cpp
M  +12   -0    src/terminalDisplay/TerminalFonts.h
M  +542  -269  src/terminalDisplay/TerminalPainter.cpp
M  +40   -13   src/terminalDisplay/TerminalPainter.h
M  +2    -0    src/widgets/EditProfileAdvancedPage.ui
M  +113  -3    src/widgets/EditProfileAppearancePage.ui
M  +61   -3    src/widgets/EditProfileDialog.cpp
M  +6    -1    src/widgets/EditProfileDialog.h

https://invent.kde.org/utilities/konsole/commit/76f879cd70fb494ab2334d2660b34679546f3d9d
Comment 9 Kurt Hindenburg 2024-03-24 02:31:13 UTC
Let us know if you still have this issue on recent version
Comment 10 G Karunakar 2024-03-26 10:34:47 UTC
(In reply to Kurt Hindenburg from comment #9)
> Let us know if you still have this issue on recent version

Let me know which specific version to test? Would it suffice to test on Kubuntu 23.10 ? it has Plasma 5.27 .
My debian has older konsole 20.12.3.
Comment 11 Bug Janitor Service 2024-04-10 03:47:42 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2024-04-25 03:46:25 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!