diff --git a/ChangeLog b/ChangeLog index 16fe7ff0d..801b05df1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-12-07 Werner Lemberg + + * 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 * src/truetype/ttobjs.c (tt_size_init): size->ttmetrics.valid is diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index d65b69c55..991705dc8 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 67c50486a..2f0af79da 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 )