crossterm, termion: Reset bold with SGR 22 instead of 21 (#402)

NoBold (21) doesn't work in many terminals
22 (named NormalIntensity in crossterm, and NoFaint in termion) seems to do a better job.

Attempt at fixing #401.
This commit is contained in:
mara 2019-10-28 22:46:47 +01:00 committed by Alexandre Bury
parent fee2768777
commit 1f66ac0faa
2 changed files with 2 additions and 2 deletions

View File

@ -252,7 +252,7 @@ impl backend::Backend for Backend {
match effect {
theme::Effect::Simple => (),
theme::Effect::Reverse => self.set_attr(Attribute::NoInverse),
theme::Effect::Bold => self.set_attr(Attribute::NoBold),
theme::Effect::Bold => self.set_attr(Attribute::NormalIntensity),
theme::Effect::Italic => self.set_attr(Attribute::NoItalic),
theme::Effect::Strikethrough => {
self.set_attr(Attribute::NotCrossedOut)

View File

@ -232,7 +232,7 @@ impl backend::Backend for Backend {
match effect {
theme::Effect::Simple => (),
theme::Effect::Reverse => self.write(tstyle::NoInvert),
theme::Effect::Bold => self.write(tstyle::NoBold),
theme::Effect::Bold => self.write(tstyle::NoFaint),
theme::Effect::Italic => self.write(tstyle::NoItalic),
theme::Effect::Strikethrough => self.write(tstyle::NoCrossedOut),
theme::Effect::Underline => self.write(tstyle::NoUnderline),