term: cache font baseline

No need to redo the calculation for every single cell we render,
every frame...
This commit is contained in:
Daniel Eklöf 2023-10-10 14:23:33 +02:00
parent 34aa979f46
commit 4449177517
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 12 additions and 9 deletions

View file

@ -3011,7 +3011,7 @@ box_drawing(const struct terminal *term, char32_t wc)
.cols = 1,
.pix = buf.pix,
.x = -term->font_x_ofs,
.y = term_font_baseline(term),
.y = term->font_baseline,
.width = width,
.height = height,
.advance = {