1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 15:04:36 +03:00

fixup synthetic boldening

Improve the logic that enables it so that we don't make the wrong
things bolder than they should be.
This commit is contained in:
Wez Furlong 2021-05-28 14:22:03 -07:00
parent b5bfec6510
commit 68619fcd92

View File

@ -381,7 +381,9 @@ impl ParsedFont {
/// italic for this font.
pub fn synthesize(mut self, attr: &FontAttributes) -> Self {
self.synthesize_italic = !self.italic && attr.italic;
self.synthesize_bold = attr.weight > self.weight;
self.synthesize_bold = attr.weight > FontWeight::Regular
&& attr.weight > self.weight
&& self.weight <= FontWeight::Regular;
self
}
}