From 5ab35a38d547d9f8b24ab3a6335e58a527577872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 30 Nov 2019 23:14:26 +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 743ff68..53616a7 100644 --- a/font.c +++ b/font.c @@ -122,7 +122,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",