main: round strikeout and underline position fallback handling

This commit is contained in:
Daniel Eklöf 2019-09-21 00:47:17 +02:00
parent a1cd3769a3
commit b2ca984ccb
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

4
main.c
View file

@ -634,7 +634,7 @@ main(int argc, char *const *argv)
f->underline.thickness = ceil(ft_face->underline_thickness * x_scale / 64.);
if (f->underline.position == 0.) {
f->underline.position = descent / 2.;
f->underline.position = round(descent / 2.);
f->underline.thickness = fabs(round(descent / 5.));
}
@ -648,7 +648,7 @@ main(int argc, char *const *argv)
}
if (f->strikeout.position == 0.) {
f->strikeout.position = height / 2. + descent;
f->strikeout.position = round(height / 2. + descent);
f->strikeout.thickness = f->underline.thickness;
}