ref: c97cf17acdcb38c0b9a02a0caf670e76b607ee8a
parent: e56b411f32b8e3352b9d4c70a7fc3a5ea89ac359
author: Tom Kacvinsky <[email protected]>
date: Tue Feb 6 20:08:34 EST 2001
In function CFF_Init_Face, added logic to get the units per EM from the CFF dictionary, if available.
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -387,11 +387,15 @@
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 );