summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/type1/t1afm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/type1/t1afm.c')
-rw-r--r--src/3rdparty/freetype/src/type1/t1afm.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/3rdparty/freetype/src/type1/t1afm.c b/src/3rdparty/freetype/src/type1/t1afm.c
index ef343901a4..de9c1997c4 100644
--- a/src/3rdparty/freetype/src/type1/t1afm.c
+++ b/src/3rdparty/freetype/src/type1/t1afm.c
@@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 1996-2011, 2013 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,9 +18,10 @@
#include <ft2build.h>
#include "t1afm.h"
-#include "t1errors.h"
+#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include "t1errors.h"
/*************************************************************************/
@@ -107,7 +108,7 @@
FT_Stream stream,
AFM_FontInfo fi )
{
- FT_Error error = T1_Err_Ok;
+ FT_Error error = FT_Err_Ok;
FT_Memory memory = stream->memory;
FT_Byte* start;
FT_Byte* limit;
@@ -121,14 +122,13 @@
start = (FT_Byte*)stream->cursor;
limit = (FT_Byte*)stream->limit;
- p = start;
/* Figure out how long the width table is. */
/* This info is a little-endian short at offset 99. */
p = start + 99;
if ( p + 2 > limit )
{
- error = T1_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
width_table_length = FT_PEEK_USHORT_LE( p );
@@ -148,7 +148,7 @@
if ( p + 2 > limit )
{
- error = T1_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -156,7 +156,7 @@
p += 2;
if ( p + 4 * fi->NumKernPair > limit )
{
- error = T1_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -235,10 +235,10 @@
FT_Stream stream )
{
PSAux_Service psaux;
- FT_Memory memory = stream->memory;
+ FT_Memory memory = stream->memory;
AFM_ParserRec parser;
- AFM_FontInfo fi;
- FT_Error error = T1_Err_Unknown_File_Format;
+ AFM_FontInfo fi = NULL;
+ FT_Error error = FT_ERR( Unknown_File_Format );
T1_Font t1_font = &( (T1_Face)t1_face )->type1;
@@ -251,7 +251,7 @@
fi->Descender = t1_font->font_bbox.yMin;
psaux = (PSAux_Service)( (T1_Face)t1_face )->psaux;
- if ( psaux && psaux->afm_parser_funcs )
+ if ( psaux->afm_parser_funcs )
{
error = psaux->afm_parser_funcs->init( &parser,
stream->memory,
@@ -269,7 +269,7 @@
}
}
- if ( error == T1_Err_Unknown_File_Format )
+ if ( FT_ERR_EQ( error, Unknown_File_Format ) )
{
FT_Byte* start = stream->cursor;
@@ -366,7 +366,7 @@
if ( !fi )
- return T1_Err_Invalid_Argument;
+ return FT_THROW( Invalid_Argument );
for ( i = 0; i < fi->NumTrackKern; i++ )
{
@@ -389,7 +389,7 @@
}
}
- return T1_Err_Ok;
+ return FT_Err_Ok;
}