From 16c25f9a8f10336a2391cb3a8002a2b32d5c9778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 30 Nov 2019 23:16:50 +0100 Subject: [PATCH] font: fix estimated underline thickness; descent is typically negative --- font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/font.c b/font.c index 37b2db6d..674c56ef 100644 --- a/font.c +++ b/font.c @@ -75,7 +75,7 @@ underline_strikeout_metrics(struct font *font) if (font->underline.position == 0.) { font->underline.position = descent / 2.; - font->underline.thickness = descent / 5.; + font->underline.thickness = fabs(descent / 5.); } LOG_DBG("underline: pos=%f, thick=%f",