From d473204c007a2cf9aa5662fcf58c3d09cec2492c Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 10 Jul 2002 17:10:21 +0000 Subject: [PATCH] * src/cff/cffobjs.c: small fix to select the Unicode charmap by default when needed --- ChangeLog | 3 +++ src/cff/cffobjs.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8a732faa8..b2f0b2f5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2002-07-10 David Turner + * src/cff/cffobjs.c: small fix to select the Unicode charmap by default + when needed + * src/cff/cffobjs.c: small fix to allow OpenType fonts to support Adobe charmaps when needed. diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index faca75925..32515a86b 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -483,8 +483,14 @@ cmaprec.encoding_id = 1; cmaprec.encoding = ft_encoding_unicode; + nn = (FT_UInt) root->num_charmaps; + FT_CMap_New( &cff_cmap_unicode_class_rec, NULL, &cmaprec, NULL ); + /* if no Unicode charmap was previously selected, select this one */ + if ( root->charmap == NULL && nn != (FT_UInt) root->num_charmaps ) + root->charmap = root->charmaps[nn]; + Skip_Unicode: if ( encoding->count > 0 ) {