Commit 9eeea990cc54128afcbad46058e8f925f9436fab

David Turner 2000-07-08T01:49:28

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..

diff --git a/src/cff/t2gload.c b/src/cff/t2gload.c
index 16a0af4..03d773d 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 fa4f9bf..ecce927 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 );