* 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>.
This commit is contained in:
Werner Lemberg 2015-02-19 15:42:48 +01:00
parent 93a884c6cd
commit 3a1df3e188
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,12 @@
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.

View File

@ -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 ||