somian / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

Bold as font style and color #242

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I find that having the ansi "bold" colors map to bold fonts to be a nice thing, 
but it doesn't always play nice.  Some apps assume that the bold will be a 
color change, and so do (arguably silly) things like using "bold black" to 
display text on a black background, assuming that "bold black" will really be 
"dark gray".

For that, and general aesthetic reasons, I think it would be nice if mintty 
allowed a mode where the bold colors are rendered both as the bold font, and 
with the brighter colors.

Original issue reported on code.google.com by fastcat@gmail.com on 13 Jan 2011 at 7:55

GoogleCodeExporter commented 9 years ago
Silly indeed. Bold black on black seems a bad idea even with "Show bold as 
colour". Which apps do that?

Original comment by andy.koppe on 13 Jan 2011 at 8:33

GoogleCodeExporter commented 9 years ago
dstat http://dag.wieers.com/home-made/dstat/ which is otherwise a very nice 
tool.  Googling around, it seems like BitchX does that too.  In fact, a lot of 
documentation I can find on ansi color sequences refers to the bold black color 
as dark gray, so this may be a broader issue than I had thought.

Original comment by fastcat@gmail.com on 13 Jan 2011 at 9:15

GoogleCodeExporter commented 9 years ago
Implemented in r1121 and r1122 on trunk.

I'd had a look at what other terminals do and found that xterm, rxvt, konsole 
and gnome-terminal default to bold-as-font-and-colour, whereas PuTTY, the 
Windows console and the Linux console default to bold-as-colour-only. So with 
all of those, the assumption holds that the bold attribute switches from the 
normal ANSI colour to the bright variant, independent of whether they also use 
a thicker font.

I still don't think it's a correct assumption. But apart from PuTTY, only xterm 
appears to have a bold-as-font-only mode, which can be enabled by setting the 
'boldColors' resource to false, e.g. with the '+pc' command line option. Its 
description is quite interesting: "Specifies whether to combine bold attribute 
with colors like the IBM PC, i.e., map colors 0 through 7 to colors 8 through 
15. These normally are the brighter versions of the first 8 colors, hence bold. 
The default is true." That suggests that other systems use bold-as-font-only 
too, but I haven't got any to check.

I also think that bold-as-font-only makes more sense than 
bold-as-font-and-colour, because the brighter colours are available separately 
anyway through the 16-colour control sequences, e.g. with "\e[90m" (instead of 
"\e[30m") for dark grey.

I don't feel strongly enough about this though to make it seem worth another 
option for what's a fairly minor implementation detail. Therefore I've changed 
the bold-as-font-only mode to bold-as-font-and-colour and  replaced the 'Show 
bold as colour' option with 'Show bold as font'. This defaults to off, i.e. 
bold-as-colour-only remains the default.

Original comment by andy.koppe on 16 Jan 2011 at 8:58

GoogleCodeExporter commented 9 years ago
I changed my mind regarding the last point and reintroduced 'Show bold as 
colour' as a separate option from 'Show bold as font' (in r1125). This ensures 
that users who currently use bold-as-font-only don't see an unwelcome change in 
behaviour.

Original comment by andy.koppe on 17 Feb 2011 at 7:43

GoogleCodeExporter commented 9 years ago
Having two independent options sounds like a good idea to me.  The only thing 
I'd worry about is users setting bold to show as neither and thus be 
indistinguishable from non-bold text.  That can be sufficiently dealt with by 
some validation code in the options dialog, though.  If a user sets that state 
by hand in the config file, they probably know what they're doing.

Original comment by fastcat@gmail.com on 17 Feb 2011 at 8:46

GoogleCodeExporter commented 9 years ago
I like to think that mintty users are fairly computer-literate and that they'd 
be able to work out why the bold attribute doesn't show up anymore if they 
switch off both of those options. Also, chances are that someone somewhere will 
actually want the bold attribute to be ignored.

Original comment by andy.koppe on 18 Feb 2011 at 12:14

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 20 Feb 2011 at 5:51