* src/sfnt.c (sfnt_transform_coordinates):
(sfnt_transform_f26dot6): Fix calculation of transformed coordinates in
the very rare case of arbitrary transformation matrices.
(cherry picked from commit
b6c2f360694831753a9064e48434d29d7ab07505)
for (i = 0; i < num_coordinates; ++i)
{
- x[i] = m1 * x[i] + m2 * y[i] + m3 * 1;
- y[i] = m4 * x[i] + m5 * y[i] + m6 * 1;
+ sfnt_fixed xi = m1 * x[i] + m2 * y[i] + m3 * 1;
+ sfnt_fixed yi = m4 * x[i] + m5 * y[i] + m6 * 1;
+ x[i] = xi;
+ y[i] = yi;
}
}
for (i = 0; i < num_coordinates; ++i)
{
- x[i] = m1 * x[i] + m2 * y[i] + m3 * 1;
- y[i] = m4 * x[i] + m5 * y[i] + m6 * 1;
+ sfnt_f26dot6 xi = m1 * x[i] + m2 * y[i] + m3 * 1;
+ sfnt_f26dot6 yi = m4 * x[i] + m5 * y[i] + m6 * 1;
+ x[i] = xi;
+ y[i] = yi;
}
}