[konsole] [Bug 447234] New: Strange handling of bold fonts and incorrect operation of "Draw intense colours in bold font" option.

Denys bugzilla_noreply at kde.org
Sun Dec 19 15:48:21 GMT 2021


https://bugs.kde.org/show_bug.cgi?id=447234

            Bug ID: 447234
           Summary: Strange handling of bold fonts and incorrect operation
                    of "Draw intense colours in bold font" option.
           Product: konsole
           Version: 19.12.3
          Platform: Ubuntu Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: font
          Assignee: konsole-devel at kde.org
          Reporter: rtvd at me.com
  Target Milestone: ---

Created attachment 144682
  --> https://bugs.kde.org/attachment.cgi?id=144682&action=edit
Various combinations of normal/bold text in normal and bright colours as shown
by "xterm +pc"

SUMMARY
***
Background:
ANSI escape codes allow to specify colours of text as well as attributes such
as "bold". Colours can be "normal" or "bright".
So ideally a terminal should work like this:
a) normal colour + normal font -> normal colour + normal font
b) normal colour +  bold  font -> normal colour +  bold  font
c) bright colour + normal font -> bright colour + normal font
d) bright colour +  bold  font -> bright colour +  bold  font

Some antique terminals were not able to show bold fonts, so they simulated it
by changing the brightness of text from "normal" to "bright". This is called
"PC-style of bold colours".
This limitation resulted in this:
a) normal colour + normal font -> normal colour + normal font
b) normal colour +  bold  font -> BRIGHT colour + NORMAL font
c) bright colour + normal font -> bright colour + normal font
d) bright colour +  bold  font -> bright colour + NORMAL font

------------
Problem:

Strangely, Konsole does not work in either way and so it neither follows
standards nor does what it promises.
The behaviour depends on an option called "Draw intense colours in bold font".

Where "Draw intense colours in bold font" is OFF, the behaviour is identical to
"PC-style":
a) normal colour + normal font -> normal colour + normal font
b) normal colour +  bold  font -> BRIGHT colour + NORMAL font
c) bright colour + normal font -> bright colour + normal font
d) bright colour +  bold  font -> bright colour + NORMAL font
So there are no bold fonts, they are simulated. Surely this makes no sense in
any modern graphical environment where bold fonts are easily accessible.

Where "Draw intense colours in bold font" is ON, the behaviour is just weird:
a) normal colour + normal font -> normal colour + normal font
b) normal colour +  bold  font -> BRIGHT colour +  bold  font
c) bright colour + normal font -> bright colour + normal font
d) bright colour +  bold  font -> bright colour +  bold  font

So overall,
1. Konsole does not follow standards precisely in any case.
2. The meaning of "Draw intense colours in bold font" is actually "Draw bold
fonts in intense colours".

I suppose the original intention for "Draw intense colours in bold font" was to
simulate "PC-style" workaround for incapable devices. However, it does a
different thing, which is both non-standard and not useful AFAIK.

I am attaching three screenshots showing the behaviour.
One of the screenshots is that of xterm with "PC-style behaviour" switched off.
It shows the ideal output, demonstrating the available richness of text
attributes. The other two are two different modes of Konsole.

***


STEPS TO REPRODUCE
1. In Konsole, produce text with various boldness attributes and colours from
both levels of brightness. You can use
https://github.com/rtvd/terminal-aesthetics/blob/main/ansi_demo.sh with
"--no-faint" option to produce the same picture as in the screenshots.
2. Try both options of "Draw intense colours in bold font", which is in "Edit
Current Profile ..." > "Appearance".
3. Observe how the brightness and font weight change.

OBSERVED RESULT

In all cases, "bold" text attribute always makes "normal" colour to become
"bright" (for bright colours it does not do anything). Disabling "Draw intense
colours in bold fonts" simply means that bold fonts are shown as normal ones,
which essentially results in PC-style behaviour.

EXPECTED RESULT

Terminal should follow the standards of ASCI escape codes, and "show bold fonts
in intense colours" should do what it promises.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 20.04.3 LTS 
KDE Plasma Version: N/A, I am running konsole in Gnome
KDE Frameworks Version: N/A, I am running konsole in Gnome
Qt Version: 5.12.8

ADDITIONAL INFORMATION

N/A

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list