diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-04-20 21:42:10 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-04-20 21:42:10 -0400 |
commit | fa6264019f315d1e7d6cb330acd136f50261e0ab (patch) | |
tree | 67d49dc1314fafb926227414c23d6f2799f27afb /display.c | |
parent | 555797e76f787fbc04466a3281d5bafb840fe6a7 (diff) | |
download | runes-fa6264019f315d1e7d6cb330acd136f50261e0ab.tar.gz runes-fa6264019f315d1e7d6cb330acd136f50261e0ab.zip |
allow configuring the interpretation of bold
Diffstat (limited to 'display.c')
-rw-r--r-- | display.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -280,7 +280,10 @@ void runes_display_set_bold(RunesTerm *t) PangoAttrList *attrs; attrs = pango_layout_get_attributes(t->layout); - pango_attr_list_change(attrs, pango_attr_weight_new(PANGO_WEIGHT_BOLD)); + if (t->bold_is_bold) { + pango_attr_list_change( + attrs, pango_attr_weight_new(PANGO_WEIGHT_BOLD)); + } t->bold = 1; cairo_set_source(t->cr, runes_display_get_fgcolor(t)); } @@ -290,7 +293,10 @@ void runes_display_reset_bold(RunesTerm *t) PangoAttrList *attrs; attrs = pango_layout_get_attributes(t->layout); - pango_attr_list_change(attrs, pango_attr_weight_new(PANGO_WEIGHT_NORMAL)); + if (t->bold_is_bold) { + pango_attr_list_change( + attrs, pango_attr_weight_new(PANGO_WEIGHT_NORMAL)); + } t->bold = 0; cairo_set_source(t->cr, runes_display_get_fgcolor(t)); } @@ -483,7 +489,7 @@ static cairo_pattern_t *runes_display_get_fgcolor(RunesTerm *t) else if (color == -1) { return t->inverse ? t->bgdefault : t->fgdefault; } - else if (t->bold) { + else if (t->bold_is_bright && t->bold) { return t->brightcolors[color]; } else { |