diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-05-31 15:11:58 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-06-24 15:30:46 +0000 |
| commit | 50be9242852756aac6fd82b0531ed92eeb44c754 (patch) | |
| tree | ddccdadfde8a51931e51ace6d87a98ba8ddeefe0 | |
| parent | render: use column count from grapheme instead of first glyph, when we have one (diff) | |
render: handle fcft_glyph_rasterize() failure correctly
| -rw-r--r-- | render.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -582,9 +582,14 @@ render_cell(struct terminal *term, pixman_image_t *pix, if (single == NULL && grapheme == NULL) { xassert(base != 0); single = fcft_glyph_rasterize(font, base, term->font_subpixel); - glyph_count = 1; - glyphs = &single; - cell_cols = single->cols; + if (single == NULL) { + glyph_count = 0; + cell_cols = 1; + } else { + glyph_count = 1; + glyphs = &single; + cell_cols = single->cols; + } } } |
