From 3eaa5d69b0a5954c96624d1d17dd7d390c6ffc67 Mon Sep 17 00:00:00 2001 From: Tom Kacvinsky Date: Wed, 22 Nov 2000 14:34:22 +0000 Subject: [PATCH] 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. --- src/cff/t2objs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cff/t2objs.c b/src/cff/t2objs.c index 65d38b324..e2958a515 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;