shithub: freetype+ttf2subf

Download patch

ref: 2a0903a54b637bc320e9fcad5161ddce3c26f484
parent: 21a7d84448b82941ba9c5e82e99ed80dc72c93ee
author: Werner Lemberg <[email protected]>
date: Sat Dec 3 03:13:43 EST 2005

* src/type42/t42objs.x (T42_Face_Init): Replace call to
FT_New_Memory_Face with call to FT_Open_Face to pass `params'.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-02  Taek Kwan(TK) Lee  <[email protected]>
+
+	* src/type42/t42objs.x (T42_Face_Init): Replace call to
+	FT_New_Memory_Face with call to FT_Open_Face to pass `params'.
+
 2005-11-30  Werner Lemberg  <[email protected]>
 
 	* docs/CHANGES: Document ftdump's `-v' option.
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -263,11 +263,25 @@
     root->available_sizes = 0;
 
     /* Load the TTF font embedded in the T42 font */
-    error = FT_New_Memory_Face( FT_FACE_LIBRARY( face ),
-                                face->ttf_data,
-                                face->ttf_size,
-                                0,
-                                &face->ttf_face );
+    {
+      FT_Open_Args  args;
+
+
+      args.flags       = FT_OPEN_MEMORY;
+      args.memory_base = face->ttf_data;
+      args.memory_size = face->ttf_size;
+
+      if ( num_params )
+      {
+        args.flags     |= FT_OPEN_PARAMS;
+        args.num_params = num_params;
+        args.params     = params;
+      }
+
+      error = FT_Open_Face( FT_FACE_LIBRARY( face ),
+                            &args, 0, &face->ttf_face );
+    }
+
     if ( error )
       goto Exit;