Commit 9ed5332fe632ada7de8fd345c9ef579b678c4042

Jany Belluz 2021-11-04T08:56:59

[truetype] Fix CVAR handling of tuples for all points. * src/truetype/ttgxvar (tt_face_vary_cvt): Function `ft_var_readpackedpoints`, when it returns `ALL_POINTS`, also sets `point_count` to value 0. However, the CVAR code was incorrectly expecting that `point_count` would be set to match the length of the CVT table.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index f3f8303..e4da810 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -3416,9 +3416,7 @@
                                         point_count == 0 ? face->cvt_size
                                                          : point_count );
 
-      if ( !points                                                        ||
-           !deltas                                                        ||
-           ( localpoints == ALL_POINTS && point_count != face->cvt_size ) )
+      if ( !points || !deltas )
         ; /* failure, ignore it */
 
       else if ( localpoints == ALL_POINTS )