* src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'. This is hard-coded to value 2 in `fvar' version 1.0 (and no newer version exists), but some fonts set it incorrectly. Problem reported by Adam Twardoch <adam@fontlab.com>.
diff --git a/ChangeLog b/ChangeLog
index df93a20..f1d3669 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2015-02-19 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgxvar.c (TT_Get_MM_Var): Ignore `countSizePairs'.
+
+ This is hard-coded to value 2 in `fvar' version 1.0 (and no newer
+ version exists), but some fonts set it incorrectly.
+
+ Problem reported by Adam Twardoch <adam@fontlab.com>.
+
+2015-02-19 Werner Lemberg <wl@gnu.org>
+
[cff] Emit better error code for invalid private dict size.
* src/cff/cffparse.c (cff_parse_private_dict): Reject negative
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 27fae10..93b16a0 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -673,7 +673,12 @@
goto Exit;
if ( fvar_head.version != (FT_Long)0x00010000L ||
+#if 0
+ /* fonts like `JamRegular.ttf' have an incorrect value for */
+ /* `countSizePairs'; since value 2 is hard-coded in `fvar' */
+ /* version 1.0, we simply ignore it */
fvar_head.countSizePairs != 2 ||
+#endif
fvar_head.axisSize != 20 ||
/* axisCount limit implied by 16-bit instanceSize */
fvar_head.axisCount > 0x3FFE ||