shithub: freetype+ttf2subf

Download patch

ref: 25ab491d559531b2fec2dc9770187a0f26482312
parent: dc8ad54f1064430115c93ab88dd968c31782ccdd
author: Werner Lemberg <[email protected]>
date: Wed Dec 10 15:04:50 EST 2003

* src/sfnt/sfobjs.c (sfnt_load_face): Set FT_FACE_FLAG_GLYPH_NAMES
only if a `post' table is present.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-12-09  Werner Lemberg  <[email protected]>
+
+	* src/sfnt/sfobjs.c (sfnt_load_face): Set FT_FACE_FLAG_GLYPH_NAMES
+	only if a `post' table is present.
+
+2003-12-09  George Williams  <[email protected]>
+
+	* src/base/ftobjs.c (load_mac_face): Recent versions of Linux
+	support Mac's HFS+ file system, thus enable code to read /rsrc on
+	non-Macintosh platforms also.
+
 2003-12-08  Werner Lemberg  <[email protected]>
 
 	* include/freetype/internal/psaux.h (PS_TableRec): Change type
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -400,7 +400,7 @@
                   FT_Int         num_params,
                   FT_Parameter*  params )
   {
-    FT_Error      error;
+    FT_Error      error, psnames_error;
     FT_Bool       has_outline;
     FT_Bool       is_apple_sbit;
 
@@ -462,7 +462,7 @@
     /* the following tables are optional in PCL fonts -- */
     /* don't check for errors                            */
     (void)LOAD_( names );
-    (void)LOAD_( psnames );
+    psnames_error = LOAD_( psnames );
 
     /* do not load the metrics headers and tables if this is an Apple */
     /* sbit font file                                                 */
@@ -529,9 +529,8 @@
                FT_FACE_FLAG_HORIZONTAL;   /* horizontal data   */
 
 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
-      /* might need more polish to detect the presence of a Postscript */
-      /* name table in the font                                        */
-      flags |= FT_FACE_FLAG_GLYPH_NAMES;
+      if ( psnames_error == SFNT_Err_Ok )
+        flags |= FT_FACE_FLAG_GLYPH_NAMES;
 #endif
 
       /* fixed width font? */