Skip to content

Commit

Permalink
fixup synthetic boldening
Browse files Browse the repository at this point in the history
Improve the logic that enables it so that we don't make the wrong
things bolder than they should be.
  • Loading branch information
wez committed May 28, 2021
1 parent b5bfec6 commit 68619fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wezterm-font/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 68619fc

Please sign in to comment.