Bug 361547 - Unicode text changes size and moves around when moving cursor
Summary: Unicode text changes size and moves around when moving cursor
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: font (show other bugs)
Version: 15.12.1
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 297390 375835 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-04-09 08:05 UTC by Salvo "LtWorf" Tomaselli
Modified: 2018-04-03 00:11 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Salvo "LtWorf" Tomaselli 2016-04-09 08:05:34 UTC
Try to open vim and edit this line

πname (σ skill=='Perl' (people ⋈ skills)) ∪ π name (σ skill=='Java' (people ⋈ skills))

Now move the cursor left and right. The characters move around and it is very difficult to edit it in this way.

Reproducible: Always
Comment 1 Geoff Streeter 2016-08-22 13:51:49 UTC
I also see this. Use the following two lines:
¹⁰ ① fails, ② succeeds, ③ fails
¹¹ ① fails, ② succeeds, ③ fails

Place the caret on the first character and move it right, down, left, up. I am using Monospace size 16  as font. I suspect problems when rendering ①②③ as I don't think the font is truly monospace for these.
Comment 2 Christoph Feck 2017-02-01 22:36:01 UTC
*** Bug 375835 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Feck 2017-02-17 13:04:09 UTC
*** Bug 297390 has been marked as a duplicate of this bug. ***
Comment 4 Christian Herenz 2018-02-20 19:28:29 UTC
Easily reproducible.   Please change status to confirmed!
Comment 5 Kurt Hindenburg 2018-02-22 02:39:20 UTC
yes, Konsole has had this issue for quite a while
Comment 6 Kurt Hindenburg 2018-04-03 00:11:35 UTC
Git commit a565bc97337a3bfc3a027f46aa2dec3e9a6f8618 by Kurt Hindenburg, on behalf of Mariusz Glebocki.
Committed on 03/04/2018 at 00:11.
Pushed by hindenburg into branch 'master'.

Clip character drawing to its own cell

Summary:
To calculate string width, Konsole uses character cell widths.
Rendering engine uses actual characters widths for this purpose.
Those sizes are equal in fixed-width fonts, as long as the font
has specific character. Since no font contains all Unicode characters,
some of them are taken from different fonts and their sizes differ
from their cell size. This can lead to different results depending
on how text line is split into strings.

It can be assumed that characters in Basic Latin block in every
fixed-width font are really fixed-width, and can be rendered as one
string. All other characters are rendered separately, and their
rendering surface is limited to their cell.

Before/After screenshots:
{F5749612}

Test Plan:
Paste this: `⸻test` in konsole and highlight different parts of the string

In a text editor paste this:
```
| A |
| ⸻ |
| ⟹ |
| ⧠ |
```
and move cursor vertically through characters column

Reviewers: #konsole, hindenburg

Reviewed By: #konsole, hindenburg

Subscribers: hindenburg, ngraham, #konsole

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D11237

M  +33   -28   src/TerminalDisplay.cpp

https://commits.kde.org/konsole/a565bc97337a3bfc3a027f46aa2dec3e9a6f8618