Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
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;