From ae69e7dc7d89d0b7766d097e4b18aa1e8861015f Mon Sep 17 00:00:00 2001 From: David Turner Date: Fri, 21 Dec 2001 21:21:13 +0000 Subject: [PATCH] * src/cff/cffgload.c: added a comment regarding "cntrmask" operator * src/pshinter/pshrec.c: now ignores invalid "hintmask" and "cntrmask" operators (instead of returning an error). Glyph 2028 of the CFF font "MSung-Light-Acro" couldn't be rendered otherwise (it seems its charstring is buggy, though this requires more analysis).. --- ChangeLog | 7 +++++++ README | 2 +- src/cff/cffgload.c | 7 +++++-- src/pshinter/pshrec.c | 13 +++++++++---- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2aca5fb29..261567ca8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2001-12-21 David Turner + * src/cff/cffgload.c: added a comment regarding "cntrmask" operator + + * src/pshinter/pshrec.c: now ignores invalid "hintmask" and "cntrmask" + operators (instead of returning an error). Glyph 2028 of the CFF font + "MSung-Light-Acro" couldn't be rendered otherwise (it seems its + charstring is buggy, though this requires more analysis).. + * src/cff/cffgload.c, src/psaux/t1decode.c, src/pshinter/pshrec.c, src/pshinter/ahalgo2.c, src/pshinter/pshglob.h: fixed a bug where the X and Y axis where inversed in the postscript hinter. this diff --git a/README b/README index 8f353caae..b032efc63 100644 --- a/README +++ b/README @@ -11,7 +11,7 @@ ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.0.6.tar.bz2 ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.0.6.tar.gz - ftp://ftp.freetype.org/pub/freetype2/ftdoc205.zip + ftp://ftp.freetype.org/pub/freetype2/ftdoc206.zip Enjoy! diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c index 9a1d45fc3..d4de39737 100644 --- a/src/cff/cffgload.c +++ b/src/cff/cffgload.c @@ -1092,7 +1092,10 @@ case cff_op_cntrmask: FT_TRACE4(( op == cff_op_hintmask ? " hintmask" : " cntrmask" )); - /* implement vstem when needed */ + /* implement vstem when needed */ + /* the specification doesn't say it, but this also works */ + /* with the 'cntrmask' operator !! */ + /* */ if ( num_args > 0 ) { if ( hinter ) @@ -1100,7 +1103,7 @@ 0, num_args / 2, args ); - + decoder->num_hints += num_args / 2; } diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c index 140a9524d..f03e36301 100644 --- a/src/pshinter/pshrec.c +++ b/src/pshinter/pshrec.c @@ -23,6 +23,7 @@ #include "pshrec.h" #include "pshalgo.h" +#define FT_COMPONENT trace_ttgload #ifdef DEBUG_HINTER extern PS_Hints ps_debug_hints = 0; @@ -1003,10 +1004,12 @@ /* check bit count; must be equal to current total hint count */ if ( bit_count != count1 + count2 ) { - error = FT_Err_Invalid_Argument; FT_ERROR(( "%s: called with invalid bitcount %d (instead of %d)\n", + "ps.hinter.type2.hintmask", bit_count, count1 + count2 )); - goto Fail; + + /* simply ignore the operator */ + return; } /* set-up new horizontal and vertical hint mask now */ @@ -1046,10 +1049,12 @@ /* check bit count, must be equal to current total hint count */ if ( bit_count != count1 + count2 ) { - error = FT_Err_Invalid_Argument; FT_ERROR(( "%s: called with invalid bitcount %d (instead of %d)\n", + "ps.hinter.type2.counter", bit_count, count1 + count2 )); - goto Fail; + + /* simply ignore the operator */ + return; } /* set-up new horizontal and vertical hint mask now */