render: make 'glyph' assignment more readable

This commit is contained in:
Daniel Eklöf 2020-04-26 12:39:42 +02:00
parent db0ac438be
commit ce280537de
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -403,9 +403,10 @@ render_cell(struct terminal *term, pixman_image_t *pix,
}
struct fcft_font *font = attrs_to_font(term, &cell->attrs);
const struct fcft_glyph *glyph = cell->wc != 0
? fcft_glyph_rasterize(font, cell->wc, term->font_subpixel)
: NULL;
const struct fcft_glyph *glyph = NULL;
if (cell->wc != 0)
glyph = fcft_glyph_rasterize(font, cell->wc, term->font_subpixel);
int cell_cols = glyph != NULL ? max(1, glyph->cols) : 1;