summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vte.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vte.cc b/src/vte.cc
index e6af1e75..742e73b8 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -7339,12 +7339,12 @@ Terminal::update_font_desc()
pango_font_description_unset_fields(desc.get(),
PangoFontMask(PANGO_FONT_MASK_GRAVITY |
PANGO_FONT_MASK_STYLE));
+
+ auto const max_weight = 1000 - VTE_FONT_WEIGHT_BOLDENING;
if ((pango_font_description_get_set_fields(desc.get()) & PANGO_FONT_MASK_WEIGHT) &&
- (pango_font_description_get_weight(desc.get()) > PANGO_WEIGHT_MEDIUM) &&
+ (pango_font_description_get_weight(desc.get()) > max_weight) &&
!m_bold_is_bright) {
- pango_font_description_set_weight(desc.get(),
- std::min(pango_font_description_get_weight(desc.get()),
- PANGO_WEIGHT_MEDIUM));
+ pango_font_description_set_weight(desc.get(), PangoWeight(max_weight));
}
bool const same_desc = m_unscaled_font_desc &&