ref: 3774b997b04a0a63e3f048b92497ebf6069c67ae
parent: 53ac64e39f6836d26f9244fe6846161a4659757f
author: Werner Lemberg <[email protected]>
date: Sat Aug 20 01:45:42 EDT 2005
* src/sfnt/ttload.c (tt_face_load_metrics_header): Ignore missing `hhea' table for SFNT Mac fonts. Change based on a patch by [email protected].
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-20 Werner Lemberg <[email protected]>
+
+ * src/sfnt/ttload.c (tt_face_load_metrics_header): Ignore missing
+ `hhea' table for SFNT Mac fonts. Change based on a patch by
+ [email protected].
+
2005-08-20 Masatake YAMATO <[email protected]>
* src/otvalid/otvmod.c (otv_validate): Use ft_validator_run instead
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -1092,12 +1092,20 @@
}
else
{
- /* The horizontal header is mandatory; return an error if we */
- /* don't find it. */
+ /* The horizontal header is mandatory for most fonts; return */
+ /* an error if we don't find it. */
error = face->goto_table( face, TTAG_hhea, stream, 0 );
if ( error )
{
error = SFNT_Err_Horiz_Header_Missing;
+
+ /* No `hhea' table necessary for SFNT Mac fonts. */
+ if ( face->format_tag == TTAG_true )
+ {
+ FT_TRACE2(( "missing. This is an SFNT Mac font.\n"));
+ error = SFNT_Err_Ok;
+ }
+
goto Exit;
}