From e88c5261c3867afbf77244bcd1c552d3c32120bf Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 24 Oct 2006 05:46:26 +0000 Subject: [PATCH] * src/cff/cffload.c (cff_encoding_load): Remove unused variable. * src/base/ftobjs.c (FT_Select_Charmap): Disallow FT_ENCODING_NONE as argument. --- ChangeLog | 7 +++++++ src/base/ftobjs.c | 3 +++ src/cff/cffload.c | 3 --- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1aa0d7cee..bc1f49a22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-10-24 Werner Lemberg + + * src/cff/cffload.c (cff_encoding_load): Remove unused variable. + + * src/base/ftobjs.c (FT_Select_Charmap): Disallow FT_ENCODING_NONE + as argument. + 2006-10-23 Zhe Su * src/base/ftoutln.c (FT_Outline_Get_Orientation): Re-implement to diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 0da8768c5..417dc704c 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2574,6 +2574,9 @@ if ( !face ) return FT_Err_Invalid_Face_Handle; + if ( encoding == FT_ENCODING_NONE ) + return FT_Err_Invalid_Argument; + /* FT_ENCODING_UNICODE is special. We try to find the `best' Unicode */ /* charmap available, i.e., one with UCS-4 characters, if possible. */ /* */ diff --git a/src/cff/cffload.c b/src/cff/cffload.c index 2b59481d9..cd88788b1 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -1924,9 +1924,6 @@ } else { - FT_UInt i; - - /* We take into account the fact a CFF font can use a predefined */ /* encoding without containing all of the glyphs encoded by this */ /* encoding (see the note at the end of section 12 in the CFF */