Bug 440070 - Issues with rendering multi-width characters with bitmap fonts.
Summary: Issues with rendering multi-width characters with bitmap fonts.
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-20 13:05 UTC by Martin Sandsmark
Modified: 2022-08-27 01:10 UTC (History)
1 user (show)

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


Attachments
Attribution line problem (5.70 KB, image/png)
2021-07-20 13:05 UTC, Martin Sandsmark
Details
Another issue (4.64 KB, image/png)
2021-07-20 13:06 UTC, Martin Sandsmark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Sandsmark 2021-07-20 13:05:54 UTC
Created attachment 140215 [details]
Attribution line problem

Haven't bisected it, but "tests/UTF-8-demo.txt" shows a ton of issues.

Attached a screenshot of one that is hard to explain, the text jumps back and forth on the attribution line, and one more obvious one. There's other issues as well, but I suspect they are for the same reason.

Might be related to 402613
Comment 1 Martin Sandsmark 2021-07-20 13:06:40 UTC
Created attachment 140216 [details]
Another issue
Comment 2 Martin Sandsmark 2021-07-20 13:15:42 UTC
Ok, tried to bisect it, but it had the same issue way back in 2017.

And I figured out the issue only had started appear because I had switched to using Terminus which is a bitmap font.

So it should probably be fixed, but not a big problem tbh., people (including me) should use better fonts.
Comment 3 Jan Klos 2022-05-12 19:27:12 UTC
Arch Linux / 5.24.5 / 22.04

Ping. What is the correct resolution for this? I really don't want to stop using Terminus just because of this! It seems that Konsole/Yakuake is falling back to other (nonbitmap? nonmonospace?) font for special characters it cannot find in the bitmap font? Could maybe this be fixed by cropping that one character without it breaking the neighbouring characters?
Comment 4 Bug Janitor Service 2022-08-06 18:51:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/722
Comment 5 Kurt Hindenburg 2022-08-27 01:10:40 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 450017, bug 445846, bug 453086, bug 381593, 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