diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-07-23 15:35:57 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-07-25 13:53:29 +0000 |
| commit | a36f67cbe311bebd9321fbf58773dace8128fcd7 (patch) | |
| tree | 93ff896180bdf5c21cbe40445830f1d0fa124bbc /terminal.c | |
| parent | wayland: update terminals (fonts etc) on xdg_output_handle_done() (diff) | |
render: apply new baseline calculation everywhere
* URL jump labels
* Scrollback position indicator
* Line/box drawings characters
Closes #1430
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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) { |
