* src/type42/t42objs.x (T42_Face_Init): Replace call to FT_New_Memory_Face with call to FT_Open_Face to pass `params'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
diff --git a/ChangeLog b/ChangeLog
index bc7686d..b71331b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-02 Taek Kwan(TK) Lee <taeklee@gmail.com>
+
+ * 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 <wl@gnu.org>
* docs/CHANGES: Document ftdump's `-v' option.
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index 814ad90..f3f8406 100644
--- 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;