ref: 6cc425db912497bdced7004e4b6af0dca2852ca4
parent: 2d7284e962b5fe93c8f5c95768239d7480e50d28
author: Werner Lemberg <[email protected]>
date: Sat Mar 21 02:51:07 EDT 2015
[truetype] Improve `gvar' handling. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger than the default.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-03-21 Werner Lemberg <[email protected]>
+
+ [truetype] Improve `gvar' handling.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Correctly handle
+ single-element runs. Cf. glyph `Q' in Skia.ttf with weights larger
+ than the default.
+
2015-03-20 Alexei Podtelezhnikov <[email protected]>
* src/base/fttrigon.c (FT_Vector_Rotate): Minor refactoring.
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -164,7 +164,7 @@
first = FT_GET_USHORT();
points[i++] = first;
- if ( runcnt < 1 || i + runcnt >= n )
+ if ( runcnt < 1 || i + runcnt > n )
goto Exit;
/* first point not included in run count */
@@ -179,7 +179,7 @@
first = FT_GET_BYTE();
points[i++] = first;
- if ( runcnt < 1 || i + runcnt >= n )
+ if ( runcnt < 1 || i + runcnt > n )
goto Exit;
for ( j = 0; j < runcnt; j++ )