In function T2_Init_Face, make sure that root->num_faces gets set when loading a pure CFF font, and change units_per_EM to 1000 for a pure CFF font.
diff --git a/src/cff/t2objs.c b/src/cff/t2objs.c
index 65d38b3..e2958a5 100644
--- a/src/cff/t2objs.c
+++ b/src/cff/t2objs.c
@@ -375,7 +375,6 @@
{
CFF_Font_Dict* dict = &cff->top_font.font_dict;
-
/* we need the `PSNames' module for pure-CFF and CEF formats */
if ( !psnames )
{
@@ -386,6 +385,9 @@
goto Bad_Format;
}
+ /* Set up num_faces. */
+ root->num_faces = cff->num_faces;
+
/* compute number of glyphs */
if ( dict->cid_registry )
root->num_glyphs = dict->cid_count;
@@ -393,8 +395,7 @@
root->num_glyphs = cff->charstrings_index.count;
/* set global bbox, as well as EM size */
- root->units_per_EM = (FT_UInt)FT_DivFix( 1000L << 16,
- dict->font_matrix.yy ) >> 16;
+ root->units_per_EM = 1000;
root->bbox = dict->font_bbox;
root->ascender = (FT_Short)root->bbox.yMax;
root->descender = (FT_Short)root->bbox.yMin;