* src/truetype/ttgload.c (load_truetype_glyph)

[TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Call
FT_GlyphLoader_CheckPoints before adding phantom points.  This fixes
a segfault bug with fonts (e.g. htst3.ttf) which have nested
subglyphs more than one level deep.  Reported by Anthony Fok.

* include/freetype/config/ftoption.h: Define
TT_CONFIG_OPTION_BYTECODE_INTERPRETER,
TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING, and
TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING to make it the new
default.
This commit is contained in:
Werner Lemberg 2003-06-04 07:59:58 +00:00
parent 9a8e321129
commit 6ab5624330
3 changed files with 29 additions and 9 deletions

View File

@ -1,3 +1,17 @@
2003-06-04 Werner Lemberg <wl@gnu.org>
* src/truetype/ttgload.c (load_truetype_glyph)
[TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Call
FT_GlyphLoader_CheckPoints before adding phantom points. This fixes
a segfault bug with fonts (e.g. htst3.ttf) which have nested
subglyphs more than one level deep. Reported by Anthony Fok.
* include/freetype/config/ftoption.h: Define
TT_CONFIG_OPTION_BYTECODE_INTERPRETER,
TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING, and
TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING to make it the new
default.
2003-06-03 Werner Lemberg <wl@gnu.org>
* src/autohint/ahhint.c (ah_hinter_hint_edges): Removed. Just a

View File

@ -291,7 +291,7 @@ FT_BEGIN_HEADER
/* should define FT_DEBUG_MEMORY here. */
/* */
/* Note that the memory debugger is only activated at runtime when */
/* when the _environment_ variable "FT_DEBUG_MEMORY" is also defined! */
/* when the _environment_ variable "FT2_DEBUG_MEMORY" is defined also! */
/* */
/* Do not #undef this macro here since the build system might define */
/* it for certain configurations only. */
@ -399,18 +399,19 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here, since the build system might */
/* define it for certain configurations only. */
/* */
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/
/* */
/* Define TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING to compile the */
/* unpatented work-around hinting system. You must define this if you */
/* want either to force the use of the unpatented hinting system by also */
/* defining TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING, or if you want to */
/* select it at run time using the FT_PARAM_TAG_UNPATENTED_HINTING tag. */
/* Define TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING (in addition to */
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER) to compile the unpatented */
/* work-around hinting system. You must define this if you want either */
/* to force the use of the unpatented hinting system by also defining */
/* TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING, or if you want to select */
/* it at run time using the FT_PARAM_TAG_UNPATENTED_HINTING tag. */
/* */
/* #define TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING */
#define TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING
/*************************************************************************/
@ -423,7 +424,7 @@ FT_BEGIN_HEADER
/* For this to work you must also define */
/* TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING. */
/* */
/* #define TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING */
#define TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING
/*************************************************************************/

View File

@ -779,6 +779,7 @@
FT_Bool glyph_data_loaded = 0;
#endif
if ( recurse_count >= TT_MAX_COMPOSITE_RECURSE )
{
error = TT_Err_Invalid_Composite;
@ -1279,6 +1280,10 @@
if ( error )
goto Fail;
error = FT_GlyphLoader_CheckPoints( gloader, num_points + 2, 0 );
if ( error )
goto Fail;
/* prepare the execution context */
tt_prepare_zone( &exec->pts, &gloader->base,
start_point, start_contour );