summaryrefslogtreecommitdiff
path: root/src/text_bblit.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-11-08 13:59:10 +0100
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-11-08 13:59:10 +0100
commit7416af5fd967d5abe492445df56e86ed6f726477 (patch)
treee0d5450725f478f20846da41e82f647334462faf /src/text_bblit.c
parent3ff09922185f612ba388dfd512a42f855c7e38b5 (diff)
text: bblit: use bold fonts
This makes the bblit renderer use bold fonts for bold characters. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'src/text_bblit.c')
-rw-r--r--src/text_bblit.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/text_bblit.c b/src/text_bblit.c
index 3082b32..69bcc09 100644
--- a/src/text_bblit.c
+++ b/src/text_bblit.c
@@ -64,15 +64,21 @@ static int bblit_draw(struct kmscon_text *txt,
{
const struct kmscon_glyph *glyph;
int ret;
+ struct kmscon_font *font;
+
+ if (attr->bold)
+ font = txt->bold_font;
+ else
+ font = txt->font;
if (!len) {
- ret = kmscon_font_render_empty(txt->font, &glyph);
+ ret = kmscon_font_render_empty(font, &glyph);
} else {
- ret = kmscon_font_render(txt->font, id, ch, len, &glyph);
+ ret = kmscon_font_render(font, id, ch, len, &glyph);
}
if (ret) {
- ret = kmscon_font_render_inval(txt->font, &glyph);
+ ret = kmscon_font_render_inval(font, &glyph);
if (ret)
return ret;
}