shithub: freetype+ttf2subf

Download patch

ref: bd48d35bf86c6635634ab1f13e742fb16633ac4d
parent: 3d2f06f399d88f2b94447254ddab6c8f54cec868
author: Werner Lemberg <[email protected]>
date: Wed Jul 16 03:05:11 EDT 2008

Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
 	* src/cff/cffload.h: Udpated.
 
 	* src/cff/cffobjs.c (cff_face_init): Updated.
+	Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set.
 
 2008-07-09  Werner Lemberg  <[email protected]>
 
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1037,6 +1037,11 @@
   /*      exist make FT_Load_Glyph return successfully; in all other cases */
   /*      you get an `FT_Err_Invalid_Argument' error.                      */
   /*                                                                       */
+  /*      Note that CID-keyed fonts which are in an SFNT wrapper don't     */
+  /*      have this flag set since the glyphs are accessed in the normal   */
+  /*      way (using contiguous indices); the `CID-ness' isn't visible to  */
+  /*      the application.                                                 */
+  /*                                                                       */
 #define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )
 #define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )
 #define FT_FACE_FLAG_FIXED_WIDTH       ( 1L <<  2 )
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -823,7 +823,7 @@
         cffface->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;
 #endif
 
-      if ( dict->cid_registry != 0xFFFFU )
+      if ( dict->cid_registry != 0xFFFFU && pure_cff )
         cffface->face_flags |= FT_FACE_FLAG_CID_KEYED;