mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-19 05:33:44 -04:00
render: apply new baseline calculation everywhere
* URL jump labels * Scrollback position indicator * Line/box drawings characters Closes #1430
This commit is contained in:
parent
0a61cfc3be
commit
a36f67cbe3
5 changed files with 29 additions and 22 deletions
11
terminal.c
11
terminal.c
|
|
@ -2166,6 +2166,17 @@ term_font_subpixel_changed(struct terminal *term)
|
|||
render_refresh(term);
|
||||
}
|
||||
|
||||
int
|
||||
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 = 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;
|
||||
}
|
||||
|
||||
void
|
||||
term_damage_rows(struct terminal *term, int start, int end)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue