* src/cff/cffobjs.c: small fix to select the Unicode charmap by default

when needed
This commit is contained in:
David Turner 2002-07-10 17:10:21 +00:00
parent a87bb79235
commit d473204c00
2 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2002-07-10 David Turner <david@freetype.org>
* 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.

View File

@ -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 )
{