mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
Revert "font baseline: use max(font->height, font->ascent + font->descent) when calculating font height"
This reverts commit fd813d0e6c.
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
This commit is contained in:
parent
4cf2c45baa
commit
41932287cf
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue