D18735: Improve built-in line/box characters drawing

Mariusz Glebocki noreply at phabricator.kde.org
Mon Feb 4 20:05:43 GMT 2019


mglb created this revision.
mglb added reviewers: Konsole, VDG.
mglb added a project: Konsole.
mglb requested review of this revision.

REVISION 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.
  
  F6587215: table-big.png <https://phabricator.kde.org/F6587215>
  
  F6587216: table-small.png <https://phabricator.kde.org/F6587216>
  
  F6587214: alignment.png <https://phabricator.kde.org/F6587214>
  
  Without AA:
  
  F6587330: table-big-no-aa.png <https://phabricator.kde.org/F6587330>
  
  F6587331: table-small-no-aa.png <https://phabricator.kde.org/F6587331>
  
  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 <https://phabricator.kde.org/R319:5062b40dd6c53de4fe1d447de17009a85d7793bd>).
  
  BUG 402415

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.

REPOSITORY
  R319 Konsole

BRANCH
  wip/line-block-characters-drawing (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D18735

AFFECTED FILES
  src/CMakeLists.txt
  src/Character.h
  src/LineBlockCharacters.cpp
  src/LineBlockCharacters.h
  src/LineFont.h
  src/LineFont.src
  src/TerminalDisplay.cpp
  tests/line_block_characters_table.py
  tools/CMakeLists.txt
  tools/fontembedder.cpp

To: mglb, #konsole, #vdg
Cc: konsole-devel, maciejn, thsurrel, ngraham, maximilianocuria, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20190204/0124784b/attachment-0001.html>


More information about the konsole-devel mailing list