From bd48d35bf86c6635634ab1f13e742fb16633ac4d Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 16 Jul 2008 07:05:11 +0000 Subject: [PATCH] Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set. --- ChangeLog | 1 + include/freetype/freetype.h | 5 +++++ src/cff/cffobjs.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7e5a31420..fa11b21a9 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 diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index 68dd3ff39..238eca679 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 dec152b08..21ef2459d 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;