In CID_Init_Face, use calculated units_per_EM, and if that is not available, default

to 100 units per EM.  Changed assignment code for ascender and descender values.
This commit is contained in:
Tom Kacvinsky 2001-03-10 19:06:54 +00:00
parent 025c2f3fb6
commit 00169a309e
1 changed files with 5 additions and 3 deletions

View File

@ -222,9 +222,11 @@
root->available_sizes = 0;
root->bbox = face->cid.font_bbox;
root->units_per_EM = 1000;
root->ascender = (FT_Short)face->cid.font_bbox.yMax;
root->descender = (FT_Short)face->cid.font_bbox.yMin;
if ( !root->units_per_EM )
root->units_per_EM = 1000;
root->ascender = face->cid.font_bbox.yMax >> 16;
root->descender = face->cid.font_bbox.yMin >> 16;
root->height = ( ( root->ascender + root->descender ) * 12 )
/ 10;