ref: 9eeea990cc54128afcbad46058e8f925f9436fab
parent: 52b430abeaf6b9768c20320bcd026e29d653030d
author: David Turner <[email protected]>
date: Fri Jul 7 21:49:28 EDT 2000
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..
--- 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 )
--- 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 );