diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-06-17 15:52:38 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-06-17 15:54:21 +0000 |
| commit | cf81fff062c8cac850f491ac722d6bb79a8bde14 (patch) | |
| tree | fc0e48563073f2eaf4eeec9a4f5c602d76eb39f4 /render.c | |
| parent | search: don’t crash when we don’t have any XKB compose state (diff) | |
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
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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( |
