aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
Diffstat (limited to 'render.c')
-rw-r--r--render.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/render.c b/render.c
index 11c2456a..48957a0a 100644
--- a/render.c
+++ b/render.c
@@ -305,7 +305,12 @@ color_brighten(const struct terminal *term, uint32_t color)
static inline int
font_baseline(const struct terminal *term)
{
- return term->font_y_ofs + term->fonts[0]->ascent;
+ const struct fcft_font *font = term->fonts[0];
+ const int line_height = term->cell_height;
+ const int font_height = font->ascent + font->descent;
+ const int glyph_top_y = round((line_height - font_height) / 2.);
+
+ return term->font_y_ofs + glyph_top_y + font->ascent;
}
static void