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).
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.
Reviewers: #konsole, #vdg, fvogt, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, sandsmark, fvogt, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D18735
Summary:
Similar to the line chars, block chars look much better
if we handle them ourselves.
Test Plan: `cat tests/boxes.txt` and `cat tests/UTF-8-demo.txt`
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17294
Summary:
Replaces direct konsole_wcwidth() calls with Character object property
and the class static function, which internally still use
konsole_wcwidth().
The change also prepares the codebase for a new code for determining
character width. This way the change will barely touch existing code.
CCBUG: 396435
Test Plan:
konsole_wcwidth() is still used, just in one central place. Passed
compilation and CharacterWidthTest should be enough.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15756
Summary:
Currently Unicode uses 0x10FFFF code points. It is possible to represent
all of them with up to two 16 bit values (UTF-16), but this makes it
harder to e.g. check for their width.
Some test cases were changed. Originally they were added with an
assumption that the code point will be truncated to 16 bit value and
as a result changed to another code point.
Test Plan:
* All code points <= 0xFFFF should work as before
* Start the same tmux session in two Konsoles
* Change background to fully transparent in one of them and put it in
front of the other one, so that all text will overlap
* Generate characters with (you can pipe it to `fold -s | less -r`):
```
perl -XCSDL -e 'print map{chr($_), " "} 1..0xffff'
```
* Compare output visually.
* Code points > 0xFFFF should not be truncated to 16 bits
* "𝐀" and "퐀" should be different characters
* Some code points > 0xFFFF should have single width
* Vertical lines below should align:
```
|𝐀 |
|𠀋|
```
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel, hindenburg, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D12236
Adds faint intensity, strikeout, conceal and overline support.
echo -e 'D\e[2mD\e[9mD\e[53mD\e[8mD'
Thanks to Antonio Russo antonio e russo gmail com for patch
REVIEW: 128405
BUG: 362171
(cherry picked from commit 84b43dfb21)
Adds faint intensity, strikeout, conceal and overline support.
echo -e 'D\e[2mD\e[9mD\e[53mD\e[8mD'
Thanks to Antonio Russo antonio e russo gmail com for patch
REVIEW: 128405
BUG: 362171
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
BUG: 344275
A new 'isRealCharacter' flag is added into the 'Character' class
to distinguish real characters and charaters used as place holders.
The code is a bit ugly now. Should improve it later when the idea and
implementation are proven to be feasible and cause no regression.
CCBUG: 188528
* Reduce amount of memory required for representing characters in scrollback buffer by not storing formatting data for each character. Instead store UTF-16 characters and formatting ranges
* Allocate memory for scrollback buffer use a custom mmap-based memory pool - this allows the memory to be released to the OS sooner when freed.
There is a small performance cost when printing a large number of lines - see bug report for figures.
Patch by Michael Meier
REVIEW: http://reviewboard.kde.org/r/802/
BUG:176974
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=987102