From 2a0903a54b637bc320e9fcad5161ddce3c26f484 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sat, 3 Dec 2005 08:13:43 +0000 Subject: [PATCH] * src/type42/t42objs.x (T42_Face_Init): Replace call to FT_New_Memory_Face with call to FT_Open_Face to pass `params'. --- ChangeLog | 5 +++++ src/type42/t42objs.c | 24 +++++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc7686d56..b71331b73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-12-02 Taek Kwan(TK) Lee + + * 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 * docs/CHANGES: Document ftdump's `-v' option. diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c index 814ad90a3..f3f8406be 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;