From 47ed6413ce8f2586b8d542dc46055e075a47022e Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 6 Aug 2010 10:14:25 +0000 Subject: Updated to freetype 2.4.1 --- freetype/src/psaux/afmparse.c | 4 ++-- freetype/src/psaux/afmparse.h | 3 ++- freetype/src/psaux/psobjs.c | 12 ++++++++++-- freetype/src/psaux/t1decode.c | 8 +++++++- 4 files changed, 21 insertions(+), 6 deletions(-) (limited to 'freetype/src/psaux') diff --git a/freetype/src/psaux/afmparse.c b/freetype/src/psaux/afmparse.c index 91a17e236..d7de3736f 100644 --- a/freetype/src/psaux/afmparse.c +++ b/freetype/src/psaux/afmparse.c @@ -4,7 +4,7 @@ /* */ /* AFM parser (body). */ /* */ -/* Copyright 2006, 2007, 2008, 2009 by */ +/* Copyright 2006, 2007, 2008, 2009, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -527,7 +527,7 @@ FT_Byte* base, FT_Byte* limit ) { - AFM_Stream stream; + AFM_Stream stream = NULL; FT_Error error; diff --git a/freetype/src/psaux/afmparse.h b/freetype/src/psaux/afmparse.h index de2a530b2..35d96046c 100644 --- a/freetype/src/psaux/afmparse.h +++ b/freetype/src/psaux/afmparse.h @@ -56,7 +56,8 @@ FT_BEGIN_HEADER typedef struct AFM_ValueRec_ { enum AFM_ValueType_ type; - union { + union + { char* s; FT_Fixed f; FT_Int i; diff --git a/freetype/src/psaux/psobjs.c b/freetype/src/psaux/psobjs.c index fe8398ae3..45c741914 100644 --- a/freetype/src/psaux/psobjs.c +++ b/freetype/src/psaux/psobjs.c @@ -4,7 +4,8 @@ /* */ /* Auxiliary functions for PostScript fonts (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ +/* 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1588,6 +1589,13 @@ FT_Error error; + /* this might happen in invalid fonts */ + if ( !outline ) + { + FT_ERROR(( "t1_builder_add_contour: no outline to add points to\n" )); + return PSaux_Err_Invalid_File_Format; + } + if ( !builder->load_points ) { outline->n_contours++; @@ -1621,7 +1629,7 @@ if ( builder->parse_state == T1_Parse_Have_Path ) error = PSaux_Err_Ok; - else if ( builder->parse_state == T1_Parse_Have_Moveto ) + else { builder->parse_state = T1_Parse_Have_Path; error = t1_builder_add_contour( builder ); diff --git a/freetype/src/psaux/t1decode.c b/freetype/src/psaux/t1decode.c index 31554ff1b..babf3ba1a 100644 --- a/freetype/src/psaux/t1decode.c +++ b/freetype/src/psaux/t1decode.c @@ -777,6 +777,8 @@ } /* the two `results' are popped by the following setcurrentpoint */ + top[0] = x; + top[1] = y; known_othersubr_result_cnt = 2; break; @@ -1480,8 +1482,12 @@ goto Syntax_Error; } else + ... #endif - decoder->flex_state = 0; + + x = top[0]; + y = top[1]; + decoder->flex_state = 0; break; case op_unknown15: -- cgit v1.2.3