[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] [BUG] We cannot handle face_index using OTC/TTC fonts
From: |
Steve Hartwell |
Subject: |
Re: [Devel] [BUG] We cannot handle face_index using OTC/TTC fonts |
Date: |
Sun, 18 Apr 2004 05:18:45 -0700 |
Oh, I see the problem now. I did not notice at first that, at the end
of the TTC-processing branch, the format_tag is replaced, so the check
at the bottom of the procedure for format_tag != TTAG_ttcf is no longer
valid.
Chisato Yamauchi's patch would work, however instead of creating
another temporary variable, I would suggest the original patch's 'else
if' branch to test for this error.
I regret not finding this problem earlier, but my application doesn't
yet support TTC fonts properly. I'll try to add something this week.
Best regards,
Steve Hartwell
Index: ttload.c
===================================================================
RCS file: /cvs/freetype/freetype2/src/sfnt/ttload.c,v
retrieving revision 1.106
diff -d -p --unified=3 -r1.106 ttload.c
--- ttload.c 2004/04/01 20:35:57 1.106
+++ ttload.c 2004/04/18 12:11:28
@@ -357,6 +357,11 @@
FT_READ_LONG( format_tag ) )
goto Exit;
}
+ else if ( face_index > 0 ) /* disallow face index values > 0 for
non-TTC files */
+ {
+ error = SFNT_Err_Bad_Argument;
+ goto Exit;
+ }
/* the format tag was read, now check the rest of the header */
sfnt->format_tag = format_tag;
@@ -373,10 +378,6 @@
error = SFNT_Err_Unknown_File_Format;
goto Exit;
}
-
- /* disallow face index values > 0 for non-TTC files */
- if ( format_tag != TTAG_ttcf && face_index > 0 )
- error = SFNT_Err_Bad_Argument;
Exit:
return error;