text: bbulk: implement bold-char renderer
Instead of always using the regular font, we now use the bold font for bold characters. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
da58968095
commit
3ff0992218
@ -118,15 +118,21 @@ static int bbulk_draw(struct kmscon_text *txt,
|
||||
const struct kmscon_glyph *glyph;
|
||||
int ret;
|
||||
struct uterm_video_blend_req *req;
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user