shithub: freetype+ttf2subf

Download patch

ref: c3dfbde0743b8ead538da9f04944052fc384a234
parent: 5c4f5ebd0dc835a528e294a2d10626c813ad87ee
author: Tom Kacvinsky <[email protected]>
date: Wed Nov 22 09:34:22 EST 2000

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.

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/cff/t2objs.c
+++ b/src/cff/t2objs.c
@@ -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;