mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-23 05:33:57 -04:00
render: make 'glyph' assignment more readable
This commit is contained in:
parent
db0ac438be
commit
ce280537de
1 changed files with 4 additions and 3 deletions
7
render.c
7
render.c
|
|
@ -403,9 +403,10 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct fcft_font *font = attrs_to_font(term, &cell->attrs);
|
struct fcft_font *font = attrs_to_font(term, &cell->attrs);
|
||||||
const struct fcft_glyph *glyph = cell->wc != 0
|
const struct fcft_glyph *glyph = NULL;
|
||||||
? fcft_glyph_rasterize(font, cell->wc, term->font_subpixel)
|
|
||||||
: 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;
|
int cell_cols = glyph != NULL ? max(1, glyph->cols) : 1;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue