aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/psaux
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/psaux')
-rw-r--r--freetype/src/psaux/afmparse.c7
-rw-r--r--freetype/src/psaux/psauxerr.h3
-rw-r--r--freetype/src/psaux/psconv.c16
-rw-r--r--freetype/src/psaux/psobjs.c4
-rw-r--r--freetype/src/psaux/t1cmap.c8
5 files changed, 22 insertions, 16 deletions
diff --git a/freetype/src/psaux/afmparse.c b/freetype/src/psaux/afmparse.c
index fbd460d93..6ed3312f3 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 3f74c1cbe..1993042ca 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 892d9821b..08154f223 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 8b57ebbd8..6d8f232a9 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 );
}