From c9114b99269c9121e93f8c8d3684120f4c77c34c Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 10 Feb 2005 08:18:27 +0000 Subject: [PATCH] * builds/unix/freetype-config.in: Add new flag `--ftversion' to return the FreeType version. Suggested by George Williams . * docs/CHANGES: Updated. * src/otvalid/otvmod.c (otv_validate): Deallocate arrays in case of error. Reported by YAMANO-UCHI Hidetoshi . * src/psaux/t1decode.c (t1_decoder_parse_charstrings) : Accept `T1_Parse_Have_Moveto' state also which can happen in empty glyphs. Reported by Ian Brown . --- ChangeLog | 20 ++++++++++++++++++++ builds/unix/freetype-config.in | 14 ++++++++++++++ docs/CHANGES | 5 +++++ src/otvalid/otvmod.c | 13 ++++++++++++- src/psaux/t1decode.c | 5 +++-- 5 files changed, 54 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 462bfa80f..e437a9ce0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2005-02-10 Werner Lemberg + + * builds/unix/freetype-config.in: Add new flag `--ftversion' to + return the FreeType version. Suggested by George Williams + . + + * docs/CHANGES: Updated. + +2005-02-09 Werner Lemberg + + * src/otvalid/otvmod.c (otv_validate): Deallocate arrays in case + of error. Reported by YAMANO-UCHI Hidetoshi . + +2005-02-08 Werner Lemberg + + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) + : Accept `T1_Parse_Have_Moveto' state also which can + happen in empty glyphs. Reported by Ian Brown + . + 2005-02-04 Werner Lemberg * src/otlayout/*: Removed. Obsolete. diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in index d92a877a5..c0783e2a4 100644 --- a/builds/unix/freetype-config.in +++ b/builds/unix/freetype-config.in @@ -23,6 +23,7 @@ Options: the FreeType library --exec-prefix=EPREFIX override \`--exec-prefix' value with EPREFIX --version display libtool version of the FreeType library + --ftversion display FreeType version number --libs display flags for linking with the FreeType library --libtool display library name for linking with libtool --cflags display flags for compiling with the FreeType @@ -65,6 +66,19 @@ while test $# -gt 0 ; do echo @ft_version@ exit 0 ;; + --ftversion) + major=`grep define @prefix@/include/freetype2/freetype/freetype.h \ + | grep FREETYPE_MAJOR \ + | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'` + minor=`grep define @prefix@/include/freetype2/freetype/freetype.h \ + | grep FREETYPE_MINOR \ + | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'` + patch=`grep define @prefix@/include/freetype2/freetype/freetype.h \ + | grep FREETYPE_PATCH \ + | sed 's/.*[ ]\([0-9][0-9]*\).*/\1/'` + echo $major.$minor.$patch + exit 0 + ;; --cflags) echo_cflags=yes ;; diff --git a/docs/CHANGES b/docs/CHANGES index 24e4bf8c2..d64c67531 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -17,6 +17,8 @@ LATEST CHANGES BETWEEN 2.1.10 and 2.1.9 distortions. It has been introduced in version 2.1.8, and it is highly recommended to upgrade. + - FreeType didn't properly parse empty Type 1 glyphs. + II. IMPORTANT CHANGES @@ -48,6 +50,9 @@ LATEST CHANGES BETWEEN 2.1.10 and 2.1.9 not mentioned this explicitly, but implementors might have relied on this after looking into the source files. + - A new option `--ftversion' has been added to freetype-config to + return the FreeType version. + LATEST CHANGES BETWEEN 2.1.9 and 2.1.8 diff --git a/src/otvalid/otvmod.c b/src/otvalid/otvmod.c index 146b58e04..3572a3dd8 100644 --- a/src/otvalid/otvmod.c +++ b/src/otvalid/otvmod.c @@ -4,7 +4,7 @@ /* */ /* FreeType's OpenType validation module implementation (body). */ /* */ -/* Copyright 2004 by */ +/* Copyright 2004, 2005 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -178,6 +178,17 @@ *ot_jstf = (FT_Bytes)jstf; Exit: + if ( error ) { + FT_Memory memory = FT_FACE_MEMORY( face ); + + + FT_FREE( base ); + FT_FREE( gdef ); + FT_FREE( gpos ); + FT_FREE( gsub ); + FT_FREE( jstf ); + } + return error; } diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index c2adf480c..cf4bcc52f 100644 --- a/src/psaux/t1decode.c +++ b/src/psaux/t1decode.c @@ -4,7 +4,7 @@ /* */ /* PostScript Type 1 decoding routines (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004 by */ +/* Copyright 2000-2001, 2002, 2003, 2004, 2005 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -796,7 +796,8 @@ FT_TRACE4(( " closepath" )); close_contour( builder ); - if ( builder->parse_state != T1_Parse_Have_Path ) + if ( !( builder->parse_state == T1_Parse_Have_Path || + builder->parse_state == T1_Parse_Have_Moveto ) ) goto Syntax_Error; builder->parse_state = T1_Parse_Have_Width; break;