diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-04-26 10:39:42 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-04-26 10:39:42 +0000 |
| commit | ce280537ded217a702346df641ac09eeade0f153 (patch) | |
| tree | fd430c5af0bce64e695399b2fb4862844ec23893 /render.c | |
| parent | changelog: CSI 13;2t and CSI 14t have also been implemented (diff) | |
render: make 'glyph' assignment more readable
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |
