[gxvar] Another optimization in computing scalar.

Another ~6% speedup in GoogleSansFlex var drawing.

* src/truetype/ttgxvar.c (ft_var_apply_tuple): Test `ncv` for being zero.
This commit is contained in:
Behdad Esfahbod (بهداد اسفهبد) 2025-05-20 16:55:38 -06:00 committed by Werner Lemberg
parent e7cc14ba16
commit fd92af79d8

View file

@ -1909,6 +1909,13 @@
FT_TRACE6(( " axis %d coordinate %.5f:\n", i, (double)ncv / 65536 ));
if ( ncv == 0 )
{
FT_TRACE6(( " axis coordinate is zero, stop\n" ));
apply = 0;
break;
}
if ( tuple_coords[i] == ncv )
{
FT_TRACE6(( " tuple coordinate %.5f fits perfectly\n",