aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-10-10 08:52:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-10-10 08:52:35 +0000
commit41932287cf046a263ecaca0d8d140d4f57e180f1 (patch)
treec7975147b22ce8d51f23b827bff9585590eb4f51
parentrender: better description of why we disable transparency in fullscreen (diff)
Revert "font baseline: use max(font->height, font->ascent + font->descent) when calculating font height"
This reverts commit fd813d0e6cfff57cf8a8f55e9a249ddb6fbdb6d6. The intent of the reverted commit was to align font height calculation with cell height calculation. However, it turns out this breaks some fonts. Typically those with large:ish differences in their 'height' attribute, and their ascent+descent value. Closes #1511
-rw-r--r--terminal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index 9a76488e..dd92cd67 100644
--- a/terminal.c
+++ b/terminal.c
@@ -2189,7 +2189,7 @@ term_font_baseline(const struct terminal *term)
{
const struct fcft_font *font = term->fonts[0];
const int line_height = term->cell_height;
- const int font_height = max(font->height, font->ascent + font->descent);
+ 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;