aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPip Cet2024-08-10 17:01:44 +0000
committerPip Cet2024-08-11 10:22:19 +0000
commit8e925d582adba5619ab6f8d2bc7cd6a3a522a28b (patch)
tree3fcbde5df7051233a523b750b607bd005ba83671 /src
parent4dd953d3cc37a6f84458eccd6fc81966fa7207f5 (diff)
downloademacs-8e925d582adba5619ab6f8d2bc7cd6a3a522a28b.tar.gz
emacs-8e925d582adba5619ab6f8d2bc7cd6a3a522a28b.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/sfnt.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sfnt.c b/src/sfnt.c
index 34ff6964c31..b235c795ef7 100644
--- a/src/sfnt.c
+++ b/src/sfnt.c
@@ -2578,8 +2578,10 @@ sfnt_transform_coordinates (struct sfnt_compound_glyph_component *component,
2578 2578
2579 for (i = 0; i < num_coordinates; ++i) 2579 for (i = 0; i < num_coordinates; ++i)
2580 { 2580 {
2581 x[i] = m1 * x[i] + m2 * y[i] + m3 * 1; 2581 sfnt_fixed xi = m1 * x[i] + m2 * y[i] + m3 * 1;
2582 y[i] = m4 * x[i] + m5 * y[i] + m6 * 1; 2582 sfnt_fixed yi = m4 * x[i] + m5 * y[i] + m6 * 1;
2583 x[i] = xi;
2584 y[i] = yi;
2583 } 2585 }
2584} 2586}
2585 2587
@@ -12822,8 +12824,10 @@ sfnt_transform_f26dot6 (struct sfnt_compound_glyph_component *component,
12822 12824
12823 for (i = 0; i < num_coordinates; ++i) 12825 for (i = 0; i < num_coordinates; ++i)
12824 { 12826 {
12825 x[i] = m1 * x[i] + m2 * y[i] + m3 * 1; 12827 sfnt_f26dot6 xi = m1 * x[i] + m2 * y[i] + m3 * 1;
12826 y[i] = m4 * x[i] + m5 * y[i] + m6 * 1; 12828 sfnt_f26dot6 yi = m4 * x[i] + m5 * y[i] + m6 * 1;
12829 x[i] = xi;
12830 y[i] = yi;
12827 } 12831 }
12828} 12832}
12829 12833