Commit bd48d35bf86c6635634ab1f13e742fb16633ac4d

Werner Lemberg 2008-07-16T07:05:11

Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set.

diff --git a/ChangeLog b/ChangeLog
index 7e5a314..fa11b21 100644
--- 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  <wl@gnu.org>
 
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 68dd3ff..238eca6 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1037,6 +1037,11 @@ FT_BEGIN_HEADER
   /*      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 )
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index dec152b..21ef245 100644
--- 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;