aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-11-30 22:16:50 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-11-30 22:16:50 +0000
commit16c25f9a8f10336a2391cb3a8002a2b32d5c9778 (patch)
tree3d2ca93363689a1867de26ddd8156a296c336022
parentterm: mouse reporting functions no longer take modifier state (diff)
font: fix estimated underline thickness; descent is typically negative
-rw-r--r--font.c2
1 files changed, 1 insertions, 1 deletions
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",