From a0942f950df3b8826db4b1a3f149b7d0ed45adcf Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 19 Aug 2022 02:54:49 +0200 Subject: config: add setting for underline thickness This adds an "underline-thickness" setting to the "main" section, similar to the existing "underline-offset" setting. This setting is used to specify a custom height for regular (= non-cursor) underlines. Fixes #1136 --- render.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'render.c') diff --git a/render.c b/render.c index 82c9bd13..ef698911 100644 --- a/render.c +++ b/render.c @@ -372,7 +372,10 @@ draw_underline(const struct terminal *term, pixman_image_t *pix, const struct fcft_font *font, const pixman_color_t *color, int x, int y, int cols) { - const int thickness = font->underline.thickness; + const int thickness = term->conf->underline_thickness.px >= 0 + ? term_pt_or_px_as_pixels( + term, &term->conf->underline_thickness) + : font->underline.thickness; /* Make sure the line isn't positioned below the cell */ const int y_ofs = min(underline_offset(term, font), -- cgit v1.3