diff --git a/ChangeLog b/ChangeLog index fa6ac11f5..63403ee7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2016-02-06 Werner Lemberg + + [cff] Fix some Type 2 operators in old CFF engine. + + * src/cff/cffgload.c (cff_decoder_parse_charstrings): Fix `eq' + operator, add `not' and (unsupported) `blend' operators. + 2016-02-05 Sebastian Rasmussen Make direct call of `make install' work (#47072). diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c index 0ef48f17d..36a353d78 100644 --- a/src/cff/cffgload.c +++ b/src/cff/cffgload.c @@ -2221,15 +2221,26 @@ break; case cff_op_store: + /* this operator was removed from the Type2 specification */ + /* in version 16-March-2000 */ FT_TRACE4(( " store\n")); goto Unimplemented; case cff_op_load: + /* this operator was removed from the Type2 specification */ + /* in version 16-March-2000 */ FT_TRACE4(( " load\n" )); goto Unimplemented; + case cff_op_blend: + /* this operator was removed from the Type2 specification */ + /* in version 16-March-2000 */ + FT_TRACE4(( " blend\n" )); + + goto Unimplemented; + case cff_op_dotsection: /* this operator is deprecated and ignored by the parser */ FT_TRACE4(( " dotsection\n" )); @@ -2358,11 +2369,23 @@ } break; - case cff_op_eq: + case cff_op_not: { FT_Fixed cond = !args[0]; + FT_TRACE4(( " not\n" )); + + args[0] = cond ? 0x10000L : 0; + args++; + } + break; + + case cff_op_eq: + { + FT_Fixed cond = args[0] == args[1]; + + FT_TRACE4(( " eq\n" )); args[0] = cond ? 0x10000L : 0;