diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-10-10 12:23:33 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-10-10 12:23:33 +0000 |
| commit | 4449177517c2d96857483acbc8afd7438fcdfadd (patch) | |
| tree | 16ca700c8bb42ab78f141467c811fdf24107e0b5 /terminal.c | |
| parent | term_font_baseline(): only center glyph when a custom line-height is being used (diff) | |
term: cache font baseline
No need to redo the calculation for every single cell we render,
every frame...
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -774,6 +774,8 @@ term_set_fonts(struct terminal *term, struct fcft_font *fonts[static 4], term->font_x_ofs = term_pt_or_px_as_pixels(term, &conf->horizontal_letter_offset); term->font_y_ofs = term_pt_or_px_as_pixels(term, &conf->vertical_letter_offset); + term->font_baseline = term_font_baseline(term); + LOG_INFO("cell width=%d, height=%d", term->cell_width, term->cell_height); sixel_cell_size_changed(term); |
