[truetype] Fix EVEN and ODD instructions.

It is possible to have a fractional part after rounding when rounding
to half-grid or super-rounding. The specs call to ignore the fractional
part in that case.

^ src/truetype/ttinterp.c (Ins_EVEN, Ins_ODD): Fix mask.
This commit is contained in:
Alexei Podtelezhnikov
2025-07-29 07:12:24 -04:00
parent ac662dcdcf
commit 47d80cf27b

View File

@@ -2567,7 +2567,7 @@
Ins_ODD( TT_ExecContext exc,
FT_Long* args )
{
args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 64 );
args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 64 ) == 64 );
}
@@ -2581,7 +2581,7 @@
Ins_EVEN( TT_ExecContext exc,
FT_Long* args )
{
args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 127 ) == 0 );
args[0] = ( ( exc->func_round( exc, args[0], 0 ) & 64 ) == 0 );
}