render: use output's subpixel mode when rasterizing glyphs

This commit is contained in:
Daniel Eklöf 2020-04-20 18:37:59 +02:00
parent 4ca6e760f2
commit 6f83ef81e5
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 79 additions and 1 deletions

View file

@ -404,7 +404,7 @@ render_cell(struct terminal *term, pixman_image_t *pix,
struct font *font = attrs_to_font(term, &cell->attrs);
const struct glyph *glyph = cell->wc != 0
? font_glyph_for_wc(font, cell->wc, term->colors.alpha == 0xffff)
? font_glyph_for_wc(font, cell->wc, term->font_subpixel)
: NULL;
int cell_cols = glyph != NULL ? max(1, glyph->cols) : 1;