| Index: src/base/ftadvanc.c
|
| diff --git a/src/base/ftadvanc.c b/src/base/ftadvanc.c
|
| index a8bb43d3d0d048ee9b48a933bc792006becec239..52078478df3b5af3b293a9ac7b052dcad31fad69 100644
|
| --- a/src/base/ftadvanc.c
|
| +++ b/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 <ft2build.h>
|
| +#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++ )
|
|
|