[konsole] [Bug 361547] Unicode text changes size and moves around when moving cursor

Kurt Hindenburg bugzilla_noreply at kde.org
Tue Apr 3 00:11:35 UTC 2018


https://bugs.kde.org/show_bug.cgi?id=361547

Kurt Hindenburg <kurt.hindenburg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://commits.kde.org/kon
                   |                            |sole/a565bc97337a3bfc3a027f
                   |                            |46aa2dec3e9a6f8618
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED

--- Comment #6 from Kurt Hindenburg <kurt.hindenburg at gmail.com> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list