mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
render: don't bother trying to lookup glyph for empty cells
Depending on the font, it may not have an entry for code point '0', which will cause us to try to load fallback fonts.
This commit is contained in:
parent
36d0f1fa5f
commit
0b30316261
1 changed files with 2 additions and 1 deletions
3
render.c
3
render.c
|
|
@ -417,7 +417,8 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
|||
}
|
||||
|
||||
struct font *font = attrs_to_font(term, &cell->attrs);
|
||||
const struct glyph *glyph = font_glyph_for_wc(font, cell->wc);
|
||||
const struct glyph *glyph = cell->wc != 0
|
||||
? font_glyph_for_wc(font, cell->wc) : NULL;
|
||||
|
||||
int cell_cols = glyph != NULL ? max(1, glyph->cols) : 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue