|
From: | McBride, Martin |
Subject: | [ft-devel] subrs length checking |
Date: | Fri, 9 May 2008 16:15:36 +0100 |
I have a Type1 font which used to work in older
versions of FreeType but fails to open in the latest version. The problem is with checking the Subrs array. There
is only one entry in the array, and it has a binary length of 4. The font also
has lenIV set to 4, so in effect the Subr contains no data. The problem is that the latest version of t1load.c
checks the binary size (line 1400)
if ( size <=
face->type1.private_dict.lenIV )
{
error = T1_Err_Invalid_File_Format;
goto Fail;
} In this case size and lenIV are both 4. Technically the font isn’t completely correct,
I think a Subr must at least have a return, but it has always worked in the
past (probably the Subr is never called). Is it sensible to cover this as a
special case by relaxing the check to be < rather than <= ? |
[Prev in Thread] | Current Thread | [Next in Thread] |