From 9df36e47186dd87407d7e40853852d1f70e08bf0 Mon Sep 17 00:00:00 2001 From: Tom Kacvinsky Date: Wed, 7 Feb 2001 01:08:34 +0000 Subject: [PATCH] In function CFF_Init_Face, added logic to get the units per EM from the CFF dictionary, if available. --- src/cff/cffobjs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index b535a3dd9..f63ac530d 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -387,12 +387,16 @@ root->num_glyphs = cff->charstrings_index.count; /* set global bbox, as well as EM size */ - root->units_per_EM = 1000; root->bbox = dict->font_bbox; root->ascender = (FT_Short)root->bbox.yMax; root->descender = (FT_Short)root->bbox.yMin; root->height = ( ( root->ascender - root->descender ) * 12 ) / 10; + if ( dict->units_per_em ) + root->units_per_EM = dict->units_per_em; + else + root->units_per_EM = 1000; + /* retrieve font family & style name */ root->family_name = CFF_Get_Name( &cff->name_index, face_index ); if ( dict->cid_registry )