* src/sfnt/ttload.c (tt_face_load_max_profile): Always set face->root.num_glyphs. * src/sfnt/ttload.c (sfnt_dir_check): Handle `bhed' properly.
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 97e511e..b0054a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-05-15 George Williams <gww@silcom.com>
+
+ * src/sfnt/ttload.c (tt_face_load_max_profile): Always set
+ face->root.num_glyphs.
+
+2004-05-14 Masatake YAMATO <jet@gyve.org>
+ George Williams <gww@silcom.com>
+
+ * src/sfnt/ttload.c (sfnt_dir_check): Handle `bhed' properly.
+
2004-05-14 Werner Lemberg <wl@gnu.org>
* src/cache/ftcbasic.c (ftc_basic_family_compare,
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 95d49b9..9e21d7d 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -207,6 +207,10 @@
FT_UInt32 magic;
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+ head_retry:
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
has_head = 1;
/* The table length should be 0x36, but certain font tools
@@ -225,6 +229,10 @@
if ( FT_STREAM_SEEK( offset + 28 + 16*nn ) )
goto Bad_Format;
}
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+ else if ( table.Tag == TTAG_bhed )
+ goto head_retry;
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
}
if ( has_head == 0 )
@@ -715,6 +723,8 @@
if ( FT_STREAM_READ_FIELDS( maxp_fields, maxProfile ) )
goto Exit;
+ face->root.num_glyphs = maxProfile->numGlyphs;
+
maxProfile->maxPoints = 0;
maxProfile->maxContours = 0;
maxProfile->maxCompositePoints = 0;
@@ -743,8 +753,6 @@
if ( maxProfile->maxFunctionDefs == 0 )
maxProfile->maxFunctionDefs = 64;
- face->root.num_glyphs = maxProfile->numGlyphs;
-
face->root.internal->max_points =
(FT_UShort)FT_MAX( maxProfile->maxCompositePoints,
maxProfile->maxPoints );