* src/sfnt/ttload.c (sfnt_init): Add tracing message.
This commit is contained in:
parent
275be9ba6d
commit
840232ad2c
|
@ -1,7 +1,11 @@
|
||||||
|
2005-11-21 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
* src/sfnt/ttload.c (sfnt_init): Add tracing message.
|
||||||
|
|
||||||
2005-11-21 Chia-I Wu <b90201047@ntu.edu.tw>
|
2005-11-21 Chia-I Wu <b90201047@ntu.edu.tw>
|
||||||
|
|
||||||
* src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): image_offset is
|
* src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Image_offset was
|
||||||
added to image_start twice when image_format is 2 or 5.
|
added twice to image_start when image_format is 2 or 5.
|
||||||
|
|
||||||
2005-11-21 Chia-I Wu <b90201047@ntu.edu.tw>
|
2005-11-21 Chia-I Wu <b90201047@ntu.edu.tw>
|
||||||
|
|
||||||
|
|
|
@ -134,15 +134,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Here, we: */
|
/* Here, we */
|
||||||
/* */
|
/* */
|
||||||
/* - check that `num_tables' is valid */
|
/* - check that `num_tables' is valid */
|
||||||
/* - look for a "head" table, check its size, and parse it to */
|
/* - look for a `head' table, check its size, and parse it to check */
|
||||||
/* see if its "magic" field is correctly set */
|
/* whether its `magic' field is correctly set */
|
||||||
/* */
|
/* */
|
||||||
/* When checking directory entries, ignore the tables `glyx' and `locx' */
|
/* When checking directory entries, ignore the tables `glyx' and `locx' */
|
||||||
/* which are hacked-out versions of `glyf' and `loca' in some PostScript */
|
/* which are hacked-out versions of `glyf' and `loca' in some PostScript */
|
||||||
/* Type 42 fonts, and will generally be invalid. */
|
/* Type 42 fonts, and which are generally invalid. */
|
||||||
/* */
|
/* */
|
||||||
static FT_Error
|
static FT_Error
|
||||||
sfnt_dir_check( SFNT_Header sfnt,
|
sfnt_dir_check( SFNT_Header sfnt,
|
||||||
|
@ -186,7 +186,8 @@
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
if ( table.Offset + table.Length > stream->size &&
|
if ( table.Offset + table.Length > stream->size &&
|
||||||
table.Tag != glyx_tag && table.Tag != locx_tag )
|
table.Tag != glyx_tag &&
|
||||||
|
table.Tag != locx_tag )
|
||||||
return SFNT_Err_Unknown_File_Format;
|
return SFNT_Err_Unknown_File_Format;
|
||||||
|
|
||||||
if ( table.Tag == TTAG_head || table.Tag == TTAG_bhed )
|
if ( table.Tag == TTAG_head || table.Tag == TTAG_bhed )
|
||||||
|
@ -198,12 +199,14 @@
|
||||||
#endif
|
#endif
|
||||||
has_head = 1;
|
has_head = 1;
|
||||||
|
|
||||||
/* The table length should be 0x36, but certain font tools
|
/*
|
||||||
* make it 0x38, so we will just check that it is greater.
|
* The table length should be 0x36, but certain font tools make it
|
||||||
|
* 0x38, so we will just check that it is greater.
|
||||||
|
*
|
||||||
|
* Note that according to the specification, the table must be
|
||||||
|
* padded to 32-bit lengths, but this doesn't apply to the value of
|
||||||
|
* its `Length' field!
|
||||||
*
|
*
|
||||||
* Note that according to the specification,
|
|
||||||
* the table must be padded to 32-bit lengths, but this doesn't
|
|
||||||
* apply to the value of its "Length" field!
|
|
||||||
*/
|
*/
|
||||||
if ( table.Length < 0x36 )
|
if ( table.Length < 0x36 )
|
||||||
return SFNT_Err_Unknown_File_Format;
|
return SFNT_Err_Unknown_File_Format;
|
||||||
|
@ -224,6 +227,7 @@
|
||||||
has_meta = 1;
|
has_meta = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* if `sing' and `meta' tables are present, there is no `head' table */
|
||||||
if ( has_head || ( has_sing && has_meta ) )
|
if ( has_head || ( has_sing && has_meta ) )
|
||||||
return SFNT_Err_Ok;
|
return SFNT_Err_Ok;
|
||||||
else
|
else
|
||||||
|
@ -252,6 +256,7 @@
|
||||||
FT_FRAME_END
|
FT_FRAME_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
face->ttc_header.tag = 0;
|
face->ttc_header.tag = 0;
|
||||||
face->ttc_header.version = 0;
|
face->ttc_header.version = 0;
|
||||||
face->ttc_header.count = 0;
|
face->ttc_header.count = 0;
|
||||||
|
@ -287,6 +292,8 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
FT_TRACE3(( "sfnt_init: synthesize TTC\n" ));
|
||||||
|
|
||||||
face->ttc_header.version = 1 << 16;
|
face->ttc_header.version = 1 << 16;
|
||||||
face->ttc_header.count = 1;
|
face->ttc_header.count = 1;
|
||||||
|
|
||||||
|
@ -426,7 +433,8 @@
|
||||||
|
|
||||||
/* check first */
|
/* check first */
|
||||||
error = sfnt_dir_check( sfnt, stream );
|
error = sfnt_dir_check( sfnt, stream );
|
||||||
if ( error ) {
|
if ( error )
|
||||||
|
{
|
||||||
FT_TRACE2(( "tt_face_load_directory: directory checking failed!\n" ));
|
FT_TRACE2(( "tt_face_load_directory: directory checking failed!\n" ));
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
|
Loading…
Reference in New Issue