* src/sfnt/sfobjc.c (sfnt_init_face): Move tag check to... * src/sfnt/ttload.c (sfnt_init): Here, before handling TTCs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
diff --git a/ChangeLog b/ChangeLog
index 16fe7ff..801b05d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-07 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjc.c (sfnt_init_face): Move tag check to...
+ * src/sfnt/ttload.c (sfnt_init): Here, before handling TTCs.
+
2005-12-06 Chia-I Wu <b90201047@ntu.edu.tw>
* src/truetype/ttobjs.c (tt_size_init): size->ttmetrics.valid is
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index d65b69c..991705d 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -376,13 +376,6 @@
if ( error )
goto Exit;
- if ( sfnt_header.format_tag != 0x00010000UL &&
- sfnt_header.format_tag != TTAG_ttcf &&
- sfnt_header.format_tag != FT_MAKE_TAG( 'O', 'T', 'T', 'O' ) &&
- sfnt_header.format_tag != TTAG_true &&
- sfnt_header.format_tag != 0x00020000UL )
- return SFNT_Err_Unknown_File_Format;
-
face->format_tag = sfnt_header.format_tag;
face->num_tables = sfnt_header.num_tables;
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 67c5048..2f0af79 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -266,6 +266,13 @@
if ( FT_READ_ULONG( tag ) )
return error;
+ if ( tag != 0x00010000UL &&
+ tag != TTAG_ttcf &&
+ tag != FT_MAKE_TAG( 'O', 'T', 'T', 'O' ) &&
+ tag != TTAG_true &&
+ tag != 0x00020000UL )
+ return SFNT_Err_Unknown_File_Format;
+
face->ttc_header.tag = TTAG_ttcf;
if ( tag == TTAG_ttcf )