* 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)..
This commit is contained in:
David Turner 2001-12-21 21:21:13 +00:00
parent de4383892e
commit ae69e7dc7d
4 changed files with 22 additions and 7 deletions

View File

@ -1,5 +1,12 @@
2001-12-21 David Turner <david@freetype.org>
* 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

2
README
View File

@ -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!

View File

@ -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;
}

View File

@ -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 */