mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
main: round strikeout position, and ceil strikeout thickness
This fixes an issue where sometimes the strikeout thickness where truncated to 0 (e.g. Cascadia Code). Note that we already do this for the underline calculations.
This commit is contained in:
parent
55968413b6
commit
a1cd3769a3
1 changed files with 2 additions and 2 deletions
4
main.c
4
main.c
|
|
@ -643,8 +643,8 @@ main(int argc, char *const *argv)
|
|||
|
||||
TT_OS2 *os2 = FT_Get_Sfnt_Table(ft_face, ft_sfnt_os2);
|
||||
if (os2 != NULL) {
|
||||
f->strikeout.position = os2->yStrikeoutPosition * x_scale / 64.;
|
||||
f->strikeout.thickness = os2->yStrikeoutSize * x_scale / 64.;
|
||||
f->strikeout.position = round(os2->yStrikeoutPosition * x_scale / 64.);
|
||||
f->strikeout.thickness = ceil(os2->yStrikeoutSize * x_scale / 64.);
|
||||
}
|
||||
|
||||
if (f->strikeout.position == 0.) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue