mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-29 07:58:28 +00:00
Fix coordinate transformations in sfnt.c
Backport. * src/sfnt.c (sfnt_transform_coordinates): (sfnt_transform_f26dot6): Fix calculation of transformed coordinates in the very rare case of arbitrary transformation matrices.
This commit is contained in:
parent
4dd953d3cc
commit
8e925d582a
12
src/sfnt.c
12
src/sfnt.c
@ -2578,8 +2578,10 @@ sfnt_transform_coordinates (struct sfnt_compound_glyph_component *component,
|
|||||||
|
|
||||||
for (i = 0; i < num_coordinates; ++i)
|
for (i = 0; i < num_coordinates; ++i)
|
||||||
{
|
{
|
||||||
x[i] = m1 * x[i] + m2 * y[i] + m3 * 1;
|
sfnt_fixed xi = m1 * x[i] + m2 * y[i] + m3 * 1;
|
||||||
y[i] = m4 * x[i] + m5 * y[i] + m6 * 1;
|
sfnt_fixed yi = m4 * x[i] + m5 * y[i] + m6 * 1;
|
||||||
|
x[i] = xi;
|
||||||
|
y[i] = yi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12822,8 +12824,10 @@ sfnt_transform_f26dot6 (struct sfnt_compound_glyph_component *component,
|
|||||||
|
|
||||||
for (i = 0; i < num_coordinates; ++i)
|
for (i = 0; i < num_coordinates; ++i)
|
||||||
{
|
{
|
||||||
x[i] = m1 * x[i] + m2 * y[i] + m3 * 1;
|
sfnt_f26dot6 xi = m1 * x[i] + m2 * y[i] + m3 * 1;
|
||||||
y[i] = m4 * x[i] + m5 * y[i] + m6 * 1;
|
sfnt_f26dot6 yi = m4 * x[i] + m5 * y[i] + m6 * 1;
|
||||||
|
x[i] = xi;
|
||||||
|
y[i] = yi;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user