shithub: freetype+ttf2subf

Download patch

ref: fcc1f472c3ace3a5c4b8ac39b3bb5622d71f9570
parent: 7b512f50d397b366bf8c503d6f69c5cd052c8d9e
author: Werner Lemberg <[email protected]>
date: Tue Apr 10 07:51:50 EDT 2007

* src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]:
Ignore `hhea' table.  This fixes Savannah bug #19261.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-10  Martin Horak  <[email protected]>
+
+	* src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]:
+	Ignore `hhea' table.  This fixes Savannah bug #19261.
+
 2007-04-09  Werner Lemberg  <[email protected]>
 
 	* Version 2.3.4 released.
--- 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 )