Bug 402415 - Some box characters sometimes incorrectly displayed
Summary: Some box characters sometimes incorrectly displayed
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: font (show other bugs)
Version: master
Platform: Compiled Sources All
: NOR normal
Target Milestone: ---
Assignee: Mariusz Glebocki
URL:
Keywords:
: 403106 405263 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-12-21 09:41 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2019-03-10 12:41 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.04.0


Attachments
Appearance directly before regression (10.56 KB, image/png)
2018-12-21 09:43 UTC, Arfrever Frehtes Taifersar Arahesis
Details
Appearance at time of introduction of regression (10.85 KB, image/png)
2018-12-21 09:44 UTC, Arfrever Frehtes Taifersar Arahesis
Details
Appearance in current master HEAD (10.78 KB, image/png)
2018-12-21 09:46 UTC, Arfrever Frehtes Taifersar Arahesis
Details
Appearance of Midnight Commander in 18.12.0 version (21.54 KB, image/png)
2018-12-24 07:35 UTC, Oleg Kapitonov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2018-12-21 09:41:08 UTC
Some box characters are sometimes incorrectly displayed since commit 14b3c8be2c15ed9711b1308b4a991de4aad5802d.

Problem occurs when "Use line characters contained in font" is disabled (which seems to be default value).

Problem can be seen in alsamixer tool.
I attach screenshots of alsamixer tool.
(Qt 5.11.3, ncurses 6.1, AlsaMixer 1.1.7)
Comment 1 Arfrever Frehtes Taifersar Arahesis 2018-12-21 09:43:02 UTC
Created attachment 117039 [details]
Appearance directly before regression

Appearance directly before regression (commit e7a945741937b86fdbb020cf6213dabf944c113b)
Comment 2 Arfrever Frehtes Taifersar Arahesis 2018-12-21 09:44:06 UTC
Created attachment 117040 [details]
Appearance at time of introduction of regression

Appearance at time of introduction of regression (commit 14b3c8be2c15ed9711b1308b4a991de4aad5802d)
Comment 3 Mariusz Glebocki 2018-12-21 09:46:35 UTC
This happens for bold characters when "draw intense colors in bold font" is checked. I am fixing it currently.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2018-12-21 09:46:56 UTC
Created attachment 117041 [details]
Appearance in current master HEAD

Appearance in current master HEAD (commit 64a93ce552c64f1f431cb164cb9ad553bc95b2b0)
Comment 5 Oleg Kapitonov 2018-12-24 07:35:46 UTC
Created attachment 117085 [details]
Appearance of Midnight Commander in 18.12.0 version
Comment 6 Oleg Kapitonov 2018-12-24 07:36:29 UTC
I have this bug with Midnight Commander and thin lines, not only bold.
Created https://bugs.kde.org/attachment.cgi?id=117085
Comment 7 Max Muller 2018-12-25 12:02:02 UTC
I have this bug for different soft as MidnightCommander, htop (process tree), alsamixer etc.
Comment 8 Arfrever Frehtes Taifersar Arahesis 2018-12-26 09:49:10 UTC
This bug report is about a problem introduced by commit which is not included in 18.12.0 release (but is currently scheduled to be included in 18.12.1 release).
There are many misrenderings in Konsole (or its dependencies like Qt) and you are likely reproducing some other problem.
Comment 9 Mariusz Glebocki 2019-01-11 15:31:09 UTC
*** Bug 403106 has been marked as a duplicate of this bug. ***
Comment 10 Mariusz Glebocki 2019-02-22 17:46:40 UTC
Git commit 13132fc77bf90d0a39c62676f3ac75caa581962f by Mariusz Glebocki.
Committed on 22/02/2019 at 17:43.
Pushed by mglebocki into branch 'master'.

Improve built-in line/block characters drawing

Summary:
* Fix bold lines (BUG 402415).
* Make drawing pixel-perfect.
* Make line width proportional to font size.
* Move relevant code to separate file and namespace.
* Remove code for checking supported line characters from Character
  class. Information about what is supported is now in one place
  together width drawing code.
* Remove fontembedder/LineFont files (no longer used).
* Add test script for displaying supported characters table.
* Add triple and quadruple dashes (U+2504...U+250B).
* Change shade block characters (U+2591...U+2593) look. When
  antialiasing is turned on, shades are drawn as transculent solid
  rectangles with 25%, 50% and 75% alpha. This matches the characters
  name/description and their usage. Without antialiasing, previous
  method with patterns is used.

**Screenshots**

Font size: 10pt; character width: 8px
{F6602823}

Font size: 11pt; character width: 9px
{F6602824}

Font size: 12pt; character width: 10px
{F6602825}

Font size: 13-14pt; character width: 11px; w/o antialiasing
{F6602826}

Font size: 13-14pt; character width: 11px
{F6602827}

Font size: 15pt; character width: 12px
{F6602828}

Font size: 6-7pt; character width: 5px
{F6602829}

Font size: 8-9pt; character width: 7px; w/o antialiasing
{F6602830}

Font size: 8-9pt; character width: 7px
{F6602831}

Alignment test (8pt)
{F6602832}

Note: Copyrights in LineBlockCharactersDrawer.cpp are based on
`git blame -w src/TerminalDisplay.cpp` executed before moving the code
to a separate file. Years from first/last commit. Authors sorted by
year. Whitespace-only changes were ignored. Maksim's code was commited
by Waldo Bastian who mentioned him as the author in commit message
(see 5062b40dd).

Test Plan:
== Common steps for all tests ==

* Open //Edit Current Profile → Appearance//.
* Turn on //Draw intense colors in bold font//.
* Turn off //Use line characters contained in font//.
* (Optional) select a font which is able to display bold characters in
  Konsole (e.g. DejaVu Sans Mono).

== Check characters validity ==

* Run `./tests/line_block_characters_table.py`.
* Open //Edit Current Profile → Appearance//.
* By switching //Use line characters contained in font// on and off,
  compare built-in characters drawing with characters from a font.
  General shape and line directions must be the same. Small offsets,
  line width differences (as long as proportions between lines in
  a character are kept), and quality differences are allowed.

== Review overall quality ==

* Run `./tests/line_block_characters_table.py`.
* Review glyphs quality in different font sizes.
* Open //Edit Current Profile → Appearance//.
* Toggle //Smooth fonts//, review quality again.

== Check alignment ==

* Display `tests/UTF-8-demo.txt`
* At the bottom of the file you can find a few alignment images. Check
  if all lines align properly. If you're unsure how it should look,
  compare it with font characters by turning on //Use line characters
  contained in font// option.

Reviewers: #konsole, #vdg, fvogt, hindenburg

Reviewed By: #konsole, hindenburg

Subscribers: hindenburg, sandsmark, fvogt, konsole-devel

Tags: #konsole

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

M  +1    -2    src/CMakeLists.txt
M  +0    -24   src/Character.h
A  +722  -0    src/LineBlockCharacters.cpp     [License: GPL (v2+)]
A  +57   -0    src/LineBlockCharacters.h     [License: GPL (v2+)]
D  +0    -21   src/LineFont.h
D  +0    -786  src/LineFont.src
M  +15   -377  src/TerminalDisplay.cpp
A  +67   -0    tests/line_block_characters_table.py
M  +0    -15   tools/CMakeLists.txt
D  +0    -138  tools/fontembedder.cpp

https://commits.kde.org/konsole/13132fc77bf90d0a39c62676f3ac75caa581962f
Comment 11 Mariusz Glebocki 2019-03-10 12:41:29 UTC
*** Bug 405263 has been marked as a duplicate of this bug. ***