Commit 00169a309e8fc6e106f8e4a00681112207f1a59a

Tom Kacvinsky 2001-03-10T19:06:54

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c
index a105320..f8ba3ae 100644
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -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;