From 9eeea990cc54128afcbad46058e8f925f9436fab Mon Sep 17 00:00:00 2001 From: David Turner Date: Sat, 8 Jul 2000 01:49:28 +0000 Subject: [PATCH] fixes from Tom related to 64-bitness and strange compiler behaviour on DEC Unix also preliminary support for CEF fonts. I can see the glyphs in "ftview" but need to complete the Unicode charmap support.. --- src/cff/t2gload.c | 2 +- src/cff/t2objs.c | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/cff/t2gload.c b/src/cff/t2gload.c index 16a0af43a..03d773d3a 100644 --- a/src/cff/t2gload.c +++ b/src/cff/t2gload.c @@ -613,7 +613,7 @@ ip += 2; } else if ( v < 247 ) - val = v - 139; + val = (FT_Long)v - 139; else if ( v < 251 ) { if ( ip >= limit ) diff --git a/src/cff/t2objs.c b/src/cff/t2objs.c index fa4f9bfe2..ecce92756 100644 --- a/src/cff/t2objs.c +++ b/src/cff/t2objs.c @@ -309,21 +309,26 @@ goto Bad_Format; } + /* compute number of glyphs */ + if (dict->cid_registry) + root->num_glyphs = dict->cid_count; + else + root->num_glyphs = cff->charstrings_index.count; + + /* set global bbox, as well as EM size */ + root->units_per_EM = FT_DivFix( 1000L << 16, dict->font_matrix.yy ) >> 16; + root->bbox = dict->font_bbox; + root->ascender = root->bbox.yMax; + root->descender = root->bbox.yMin; + /* retrieve font family & style name */ + root->family_name = T2_Get_Name( &cff->name_index, face_index ); if (dict->cid_registry) { - root->family_name = T2_Get_String( &cff->string_index, - dict->cid_font_name, - psnames ); - root->style_name = T2_StrCopy( memory, "Regular" ); /* XXXX */ } else { - root->family_name = T2_Get_String( &cff->string_index, - dict->base_font_name, - psnames ); - root->style_name = T2_Get_String( &cff->string_index, dict->weight, psnames );