* src/sfnt/ttload.c (sfnt_dir_check): Make it work with 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 50 51 52 53 54 55 56 57 58 59 60 61 62
diff --git a/ChangeLog b/ChangeLog
index 51558fa..6d9ee13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-07-27 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttload.c (sfnt_dir_check): Make it work with TTCs.
+
2002-07-26 Werner Lemberg <wl@gnu.org>
* src/truetype/ttgload.c (load_truetype_glyph)
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index f73c4d0..b189b54 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -159,8 +159,8 @@
FT_Error error;
FT_UInt nn, has_head = 0;
- const FT_ULong glyx_tag = FT_MAKE_TAG('g','l','y','x');
- const FT_ULong locx_tag = FT_MAKE_TAG('l','o','c','x');
+ const FT_ULong glyx_tag = FT_MAKE_TAG('g','l','y','x');
+ const FT_ULong locx_tag = FT_MAKE_TAG('l','o','c','x');
static const FT_Frame_Field sfnt_dir_entry_fields[] =
{
@@ -202,8 +202,8 @@
if ( FT_STREAM_READ_FIELDS( sfnt_dir_entry_fields, &table ) )
goto Bad_Format;
- if ( offset + table.Offset + table.Length > stream->size &&
- table.Tag != glyx_tag && table.Tag != locx_tag )
+ if ( table.Offset + table.Length > stream->size &&
+ table.Tag != glyx_tag && table.Tag != locx_tag )
goto Bad_Format;
if ( table.Tag == TTAG_head )
@@ -213,10 +213,10 @@
has_head = 1;
- if ( table.Length != 0x36 ||
- FT_STREAM_SEEK( offset + table.Offset + 12 ) ||
- FT_READ_ULONG( magic ) ||
- magic != 0x5F0F3CF5U )
+ if ( table.Length != 0x36 ||
+ FT_STREAM_SEEK( table.Offset + 12 ) ||
+ FT_READ_ULONG( magic ) ||
+ magic != 0x5F0F3CF5U )
goto Bad_Format;
if ( FT_STREAM_SEEK( offset + 28 + 16*nn ) )
@@ -349,7 +349,7 @@
}
/* seek to the appropriate TrueType file, then read tag */
- offset = face->ttc_header.offsets[ face_index ];
+ offset = face->ttc_header.offsets[face_index];
if ( FT_STREAM_SEEK( offset ) ||
FT_READ_LONG( format_tag ) )