font: fix estimated underline thickness; descent is typically negative

This commit is contained in:
Daniel Eklöf 2019-11-30 23:14:26 +01:00
parent 9c89250a2d
commit 5ab35a38d5
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
font.c
View file

@ -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",