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..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
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 );