ref: b5c7de5b37b468e9942e4936ce1c358a3c2062db
parent: 7c0d20814a252c4c3fb000dca918428a99bc72b1
author: David Turner <[email protected]>
date: Fri Dec 21 16:21:13 EST 2001
* 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)..
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2001-12-21 David Turner <[email protected]>
+ * 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
--- 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!
--- 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;
}
--- 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 */