Bug 397986 - Thin box drawing characters and I-beam cursor
Summary: Thin box drawing characters and I-beam cursor
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: font (show other bugs)
Version: 17.12.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords: accessibility, junior-jobs
Depends on:
Blocks:
 
Reported: 2018-08-28 13:47 UTC by Egmont Koblinger
Modified: 2020-04-28 12:54 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (51.24 KB, image/png)
2018-08-28 13:47 UTC, Egmont Koblinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egmont Koblinger 2018-08-28 13:47:49 UTC
Created attachment 114658 [details]
Screenshot

Box drawing characters (U+2500 to U+257F) are drawn manually by Konsole, using a 1px line even at large fonts.

See screenshot using the font 'Monospace 36'.

Lines should get wider as the font size increases, to (mostly) match the stroke width of letters.

The same applies to the I-beam cursor too.
Comment 1 Christoph Feck 2018-09-13 18:33:26 UTC
The pen width needs to get adjusted in TerminalDisplay::drawLineCharString(), both for the regular and the bold case. I suggest to use http://doc.qt.io/qt-5/qfontmetricsf.html#lineWidth

Special care has to be taken to adjust the offsets for neighbouring lines in the drawLine() calls.

https://cgit.kde.org/konsole.git/tree/src/TerminalDisplay.cpp#n771

Too thin lines can affect visibility. Raising severity and adding accessibility flag.
Comment 2 Christoph Feck 2018-09-13 18:36:47 UTC
Regarding the cursor, would need adjustments in TerminalDisplay::drawCursor().

https://cgit.kde.org/konsole.git/tree/src/TerminalDisplay.cpp#n899
Comment 3 Wolfgang Bauer 2018-11-28 13:41:11 UTC
It's even worse now in 18.11.80, see bug#401463.
Comment 4 Gastón Haro 2020-04-03 23:45:37 UTC
Can't reproduce on current version (19.12.3) and also https://bugs.kde.org/show_bug.cgi?id=401463 is fixed which I guess may have fixed this also.
Comment 5 Wolfgang Bauer 2020-04-04 09:18:35 UTC
(In reply to Gastón Haro from comment #4)
> Can't reproduce on current version (19.12.3) and also
> https://bugs.kde.org/show_bug.cgi?id=401463 is fixed which I guess may have
> fixed this also.
The line/box drawing characters are fixed, yes.

The I-beam cursor (and the underline cursor btw) is still only 1 pixel wide though, regardless of the font size.
(it uses separate code)

I'll reopen it therefore.
Comment 6 Gastón Haro 2020-04-04 16:47:01 UTC
(In reply to Wolfgang Bauer from comment #5)
> (In reply to Gastón Haro from comment #4)
> > Can't reproduce on current version (19.12.3) and also
> > https://bugs.kde.org/show_bug.cgi?id=401463 is fixed which I guess may have
> > fixed this also.
> The line/box drawing characters are fixed, yes.
> 
> The I-beam cursor (and the underline cursor btw) is still only 1 pixel wide
> though, regardless of the font size.
> (it uses separate code)
> 
> I'll reopen it therefore.

Sorry, my bad.
Comment 7 Gastón Haro 2020-04-04 19:51:41 UTC
Ok I put up a merge request for this at https://invent.kde.org/kde/konsole/-/merge_requests/74

Let's see how it goes.
Cheers.
Comment 8 Kurt Hindenburg 2020-04-28 12:54:08 UTC
Git commit 2a48850688d4fced771fb03cce7522d67c7c1a63 by Kurt Hindenburg, on behalf of Gastón Haro.
Committed on 28/04/2020 at 12:53.
Pushed by hindenburg into branch 'master'.

Cursor thickness follows font size

Summary:
Before this patch cursors (bloc, i-beam, underline)
were always drawn with 1px lines. They are now
adjusted to follow the font size.

Test Plan:
1. Open Konsole
2. Go to Edit Profile and set various font sizes and weights
3. Also mix the different cursor types
4. The cursor width should follow the font size and not
   remain always 1px wide.

M  +18   -17   src/TerminalDisplay.cpp

https://invent.kde.org/kde/konsole/commit/2a48850688d4fced771fb03cce7522d67c7c1a63