mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-18 22:05:25 -05:00
config: add underline-offset option
This option allows the user to configure a custom underline offset. That is, use the user provided offset instead of the font provided one. Closes #490
This commit is contained in:
parent
11829931a7
commit
cf81fff062
6 changed files with 42 additions and 9 deletions
6
render.c
6
render.c
|
|
@ -319,7 +319,11 @@ draw_underline_with_thickness(
|
|||
const pixman_color_t *color, int x, int y, int cols, int thickness)
|
||||
{
|
||||
/* Make sure the line isn't positioned below the cell */
|
||||
int y_ofs = font_baseline(term) - font->underline.position;
|
||||
int y_ofs = font_baseline(term) -
|
||||
(term->conf->use_custom_underline_offset
|
||||
? -term_pt_or_px_as_pixels(term, &term->conf->underline_offset)
|
||||
: font->underline.position);
|
||||
|
||||
y_ofs = min(y_ofs, term->cell_height - thickness);
|
||||
|
||||
pixman_image_fill_rectangles(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue