* builds/unix/freetype-config.in: Add new flag `--ftversion' to return the FreeType version. Suggested by George Williams <gww@silcom.com>. * docs/CHANGES: Updated. * src/otvalid/otvmod.c (otv_validate): Deallocate arrays in case of error. Reported by YAMANO-UCHI Hidetoshi <mer@din.or.jp>. * src/psaux/t1decode.c (t1_decoder_parse_charstrings) <op_closepath>: Accept `T1_Parse_Have_Moveto' state also which can happen in empty glyphs. Reported by Ian Brown <ian.brown@printsoft.de>.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
diff --git a/ChangeLog b/ChangeLog
index 462bfa8..e437a9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2005-02-10 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/freetype-config.in: Add new flag `--ftversion' to
+ return the FreeType version. Suggested by George Williams
+ <gww@silcom.com>.
+
+ * docs/CHANGES: Updated.
+
+2005-02-09 Werner Lemberg <wl@gnu.org>
+
+ * src/otvalid/otvmod.c (otv_validate): Deallocate arrays in case
+ of error. Reported by YAMANO-UCHI Hidetoshi <mer@din.or.jp>.
+
+2005-02-08 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings)
+ <op_closepath>: Accept `T1_Parse_Have_Moveto' state also which can
+ happen in empty glyphs. Reported by Ian Brown
+ <ian.brown@printsoft.de>.
+
2005-02-04 Werner Lemberg <wl@gnu.org>
* src/otlayout/*: Removed. Obsolete.
diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in
index d92a877..c0783e2 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 24e4bf8..d64c675 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 146b58e..3572a3d 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 c2adf48..cf4bcc5 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;