Bug 344275 - Rounding box drawing characters don't line up correctly.
Summary: Rounding box drawing characters don't line up correctly.
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: font (show other bugs)
Version: 2.14.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-17 15:08 UTC by Parker Coates
Modified: 2015-03-14 15:40 UTC (History)
0 users

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


Attachments
A screenshot showing 'tig' open in both Konsole and Lilyterm using identical fonts. Also the same font open in KCharSelect. (484.44 KB, image/png)
2015-02-17 15:11 UTC, Parker Coates
Details
Proof of concept patch against the KDE/4.14 branch. (5.42 KB, patch)
2015-02-18 19:57 UTC, Parker Coates
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Parker Coates 2015-02-17 15:08:57 UTC
Unicode has 4 rounded corner characters for prettier box drawing:

╭ BOX DRAWINGS LIGHT ARC DOWN AND RIGHT (U+256D)
╮ BOX DRAWINGS LIGHT ARC DOWN AND LEFT (U+256E)
╯ BOX DRAWINGS LIGHT ARC UP AND LEFT (U+256F)
╰ BOX DRAWINGS LIGHT ARC UP AND RIGHT (U+2570)

Unfortunately, Konsole doesn't always render these such that they line up with the more "normal" box drawing characters. See the screenshot.

It seems that Konsole has some special handling for normal box drawing characters, since they properly grow to accomodate an increased line spacing and never change thickness regardless of the font size. So my guess is that these rounded characters aren't receiving that same special treatment.

Reproducible: Always

Steps to Reproduce:
1. Switch console to a font that supports these characters. (Deja Vu Sans Mono is an excellent choice.)
2. a) Run  the following command: echo -e '╭─┴─╮\n│ ☠ │\n╰─┬─╯'
    b) Alternatively, run "tig" inside a git repository and press '~' to switch to fancy line drawing.
3. Use Ctrl+Mousewheel to play with the font size and watch for misalignments.

Actual Results:  
The rounded characters are drawn differently than the square ones and don't line up properly.
Comment 1 Parker Coates 2015-02-17 15:11:39 UTC
Created attachment 91129 [details]
A screenshot showing 'tig' open in both Konsole and Lilyterm using identical fonts. Also the same font open in KCharSelect.
Comment 2 Parker Coates 2015-02-18 19:57:52 UTC
Created attachment 91161 [details]
Proof of concept patch against the KDE/4.14 branch.
Comment 3 Kurt Hindenburg 2015-03-01 23:23:52 UTC
Thanks - I'm looking at this now
Comment 4 Parker Coates 2015-03-09 14:58:33 UTC
Hey, Kurt. What did you think?
Comment 5 Kurt Hindenburg 2015-03-09 15:18:59 UTC
It will likely go into the next version - I noticed a few oddities but it is better than the current state.
Comment 6 Parker Coates 2015-03-10 00:35:54 UTC
I'd be happy to fix any concerns you might have. Would you like me to put it up on ReviewBoard so you can comment there?
Comment 7 Kurt Hindenburg 2015-03-14 15:39:57 UTC
Git commit 1a61aaa5915b5c4a5b205e87d35c38562f932fe0 by Kurt Hindenburg.
Committed on 14/03/2015 at 15:36.
Pushed by hindenburg into branch 'master'.

Fix rounding line characters so they line up regardless of font

Unicode has 4 rounded corner characters for prettier box drawing:
U+256D, U+256E, U+256F, U+2570
Konsole doesn't always render these such that they line up with the
more "normal" box drawing characters.

THanks to Parker Coates coates kde org for report and patch

M  +5    -15   src/Character.h
M  +83   -0    src/TerminalDisplay.cpp

http://commits.kde.org/konsole/1a61aaa5915b5c4a5b205e87d35c38562f932fe0
Comment 8 Kurt Hindenburg 2015-03-14 15:40:43 UTC
Git commit f0628b4d5a6940ec06c26d7cae5cf13c48bfe224 by Kurt Hindenburg.
Committed on 14/03/2015 at 15:36.
Pushed by hindenburg into branch 'Applications/14.12'.

Fix rounding line characters so they line up regardless of font

Unicode has 4 rounded corner characters for prettier box drawing:
U+256D, U+256E, U+256F, U+2570
Konsole doesn't always render these such that they line up with the
more "normal" box drawing characters.

THanks to Parker Coates coates kde org for report and patch

(cherry picked from commit 1a61aaa5915b5c4a5b205e87d35c38562f932fe0)

M  +5    -15   src/Character.h
M  +83   -0    src/TerminalDisplay.cpp

http://commits.kde.org/konsole/f0628b4d5a6940ec06c26d7cae5cf13c48bfe224