* src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]: Ignore `hhea' table. This fixes Savannah bug #19261.
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
diff --git a/ChangeLog b/ChangeLog
index 2a1ce5d..ae0f9f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-10 Martin Horak <horakm@centrum.cz>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]:
+ Ignore `hhea' table. This fixes Savannah bug #19261.
+
2007-04-09 Werner Lemberg <wl@gnu.org>
* Version 2.3.4 released.
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index ffdc33b..cc90110 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -619,7 +619,22 @@
error = SFNT_Err_Ok;
}
else
+ {
error = SFNT_Err_Horiz_Header_Missing;
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ /* If this is an incrementally loaded font and there are */
+ /* overriding metrics, tolerate a missing `hhea' table. */
+ if ( face->root.internal->incremental_interface &&
+ face->root.internal->incremental_interface->funcs->
+ get_glyph_metrics )
+ {
+ face->horizontal.number_Of_HMetrics = 0;
+ error = SFNT_Err_Ok;
+ }
+#endif
+
+ }
}
if ( error )