From fa791414601df61d20d860299dba80fdb62565df Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 21 Jun 2013 10:45:51 +0200 Subject: Upgraded freetype to 2.5.0.1 --- freetype/src/base/ftadvanc.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'freetype/src/base/ftadvanc.c') diff --git a/freetype/src/base/ftadvanc.c b/freetype/src/base/ftadvanc.c index a8bb43d3d..52078478d 100644 --- a/freetype/src/base/ftadvanc.c +++ b/freetype/src/base/ftadvanc.c @@ -4,7 +4,7 @@ /* */ /* Quick computation of advance widths (body). */ /* */ -/* Copyright 2008, 2009, 2011 by */ +/* Copyright 2008, 2009, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -17,6 +17,8 @@ #include +#include FT_INTERNAL_DEBUG_H + #include FT_ADVANCES_H #include FT_INTERNAL_OBJECTS_H @@ -35,7 +37,7 @@ return FT_Err_Ok; if ( face->size == NULL ) - return FT_Err_Invalid_Size_Handle; + return FT_THROW( Invalid_Size_Handle ); if ( flags & FT_LOAD_VERTICAL_LAYOUT ) scale = face->size->metrics.y_scale; @@ -76,10 +78,10 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); if ( gindex >= (FT_UInt)face->num_glyphs ) - return FT_Err_Invalid_Glyph_Index; + return FT_THROW( Invalid_Glyph_Index ); func = face->driver->clazz->get_advances; if ( func && LOAD_ADVANCE_FAST_CHECK( flags ) ) @@ -91,7 +93,7 @@ if ( !error ) return _ft_face_scale_advances( face, padvance, 1, flags ); - if ( error != FT_ERROR_BASE( FT_Err_Unimplemented_Feature ) ) + if ( FT_ERR_NEQ( error, Unimplemented_Feature ) ) return error; } @@ -114,12 +116,12 @@ if ( !face ) - return FT_Err_Invalid_Face_Handle; + return FT_THROW( Invalid_Face_Handle ); num = (FT_UInt)face->num_glyphs; end = start + count; if ( start >= num || end < start || end > num ) - return FT_Err_Invalid_Glyph_Index; + return FT_THROW( Invalid_Glyph_Index ); if ( count == 0 ) return FT_Err_Ok; @@ -131,14 +133,14 @@ if ( !error ) return _ft_face_scale_advances( face, padvances, count, flags ); - if ( error != FT_ERROR_BASE( FT_Err_Unimplemented_Feature ) ) + if ( FT_ERR_NEQ( error, Unimplemented_Feature ) ) return error; } error = FT_Err_Ok; if ( flags & FT_ADVANCE_FLAG_FAST_ONLY ) - return FT_Err_Unimplemented_Feature; + return FT_THROW( Unimplemented_Feature ); flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY; for ( nn = 0; nn < count; nn++ ) -- cgit v1.2.3