From 41bd254198b8b879a562a85f7dc868c3c0f7fbc1 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 12 Mar 2012 10:33:22 +0100 Subject: Updated to freetype-2.4.9 --- freetype/src/psaux/afmparse.c | 7 ++----- freetype/src/psaux/psauxerr.h | 3 ++- freetype/src/psaux/psconv.c | 16 ++++++++++++---- freetype/src/psaux/psobjs.c | 4 ++-- freetype/src/psaux/t1cmap.c | 8 ++++---- 5 files changed, 22 insertions(+), 16 deletions(-) (limited to 'freetype/src/psaux') diff --git a/freetype/src/psaux/afmparse.c b/freetype/src/psaux/afmparse.c index d7de3736f..5f3f9e615 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, 2010 by */ +/* Copyright 2006-2010, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -631,9 +631,6 @@ tk->max_ptsize = shared_vals[3].u.f; tk->max_kern = shared_vals[4].u.f; - /* is this correct? */ - if ( tk->degree < 0 && tk->min_kern > 0 ) - tk->min_kern = -tk->min_kern; break; case AFM_TOKEN_ENDTRACKKERN: @@ -754,7 +751,7 @@ case AFM_TOKEN_ENDFONTMETRICS: fi->NumKernPair = n + 1; ft_qsort( fi->KernPairs, fi->NumKernPair, - sizeof( AFM_KernPairRec ), + sizeof ( AFM_KernPairRec ), afm_compare_kern_pairs ); return PSaux_Err_Ok; diff --git a/freetype/src/psaux/psauxerr.h b/freetype/src/psaux/psauxerr.h index d0baa3cbb..d52375f8c 100644 --- a/freetype/src/psaux/psauxerr.h +++ b/freetype/src/psaux/psauxerr.h @@ -4,7 +4,7 @@ /* */ /* PS auxiliary module error codes (specification only). */ /* */ -/* Copyright 2001 by */ +/* Copyright 2001, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -30,6 +30,7 @@ #undef __FTERRORS_H__ +#undef FT_ERR_PREFIX #define FT_ERR_PREFIX PSaux_Err_ #define FT_ERR_BASE FT_Mod_Err_PSaux diff --git a/freetype/src/psaux/psconv.c b/freetype/src/psaux/psconv.c index 1531d8f0f..9ea7fb988 100644 --- a/freetype/src/psaux/psconv.c +++ b/freetype/src/psaux/psconv.c @@ -4,7 +4,7 @@ /* */ /* Some convenience conversions (body). */ /* */ -/* Copyright 2006, 2008, 2009 by */ +/* Copyright 2006, 2008, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -79,7 +79,7 @@ FT_Bool sign = 0; - if ( p == limit || base < 2 || base > 36 ) + if ( p >= limit || base < 2 || base > 36 ) return 0; if ( *p == '-' || *p == '+' ) @@ -150,7 +150,7 @@ FT_Bool sign = 0; - if ( p == limit ) + if ( p >= limit ) return 0; if ( *p == '-' || *p == '+' ) @@ -346,7 +346,11 @@ #if 1 - p = *cursor; + p = *cursor; + + if ( p >= limit ) + return 0; + if ( n > (FT_UInt)( limit - p ) ) n = (FT_UInt)( limit - p ); @@ -434,6 +438,10 @@ #if 1 p = *cursor; + + if ( p >= limit ) + return 0; + if ( n > (FT_UInt)(limit - p) ) n = (FT_UInt)(limit - p); diff --git a/freetype/src/psaux/psobjs.c b/freetype/src/psaux/psobjs.c index a28b5fc24..06df6e664 100644 --- a/freetype/src/psaux/psobjs.c +++ b/freetype/src/psaux/psobjs.c @@ -4,7 +4,7 @@ /* */ /* Auxiliary functions for PostScript fonts (body). */ /* */ -/* Copyright 1996-2011 by */ +/* Copyright 1996-2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -589,7 +589,7 @@ } Exit: - if ( cur == parser->cursor ) + if ( cur < limit && cur == parser->cursor ) { FT_ERROR(( "ps_parser_skip_PS_token:" " current token is `%c' which is self-delimiting\n" diff --git a/freetype/src/psaux/t1cmap.c b/freetype/src/psaux/t1cmap.c index f933e4da8..9e5bd34ff 100644 --- a/freetype/src/psaux/t1cmap.c +++ b/freetype/src/psaux/t1cmap.c @@ -4,7 +4,7 @@ /* */ /* Type 1 character map support (body). */ /* */ -/* Copyright 2002, 2003, 2006, 2007 by */ +/* Copyright 2002, 2003, 2006, 2007, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -264,8 +264,8 @@ /*************************************************************************/ FT_CALLBACK_DEF( const char * ) - t1_get_glyph_name( T1_Face face, - FT_UInt idx ) + psaux_get_glyph_name( T1_Face face, + FT_UInt idx ) { return face->type1.glyph_names[idx]; } @@ -282,7 +282,7 @@ return psnames->unicodes_init( memory, unicodes, face->type1.num_glyphs, - (PS_GetGlyphNameFunc)&t1_get_glyph_name, + (PS_GetGlyphNameFunc)&psaux_get_glyph_name, (PS_FreeGlyphNameFunc)NULL, (FT_Pointer)face ); } -- cgit v1.2.3