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.
This commit is contained in:
Tom Kacvinsky 2000-11-22 14:34:22 +00:00
parent 761edfc0e3
commit 3eaa5d69b0
1 changed files with 4 additions and 3 deletions

View File

@ -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;