| Index: third_party/freetype/src/base/fttype1.c
|
| diff --git a/core/src/fxge/fx_freetype/fxft2.5.01/src/base/fttype1.c b/third_party/freetype/src/base/fttype1.c
|
| similarity index 69%
|
| rename from core/src/fxge/fx_freetype/fxft2.5.01/src/base/fttype1.c
|
| rename to third_party/freetype/src/base/fttype1.c
|
| index b7167b75b5ccabc9ab564066ec28a409b346a31d..47af19afb0435de864761b84dd82c9bc20376b56 100644
|
| --- a/core/src/fxge/fx_freetype/fxft2.5.01/src/base/fttype1.c
|
| +++ b/third_party/freetype/src/base/fttype1.c
|
| @@ -4,7 +4,7 @@
|
| /* */
|
| /* FreeType utility file for PS names support (body). */
|
| /* */
|
| -/* Copyright 2002-2004, 2011 by */
|
| +/* Copyright 2002-2004, 2011, 2014 by */
|
| /* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
| /* */
|
| /* This file is part of the FreeType project, and may only be used, */
|
| @@ -16,10 +16,11 @@
|
| /***************************************************************************/
|
|
|
|
|
| -#include "../../include/ft2build.h"
|
| -#include "../../include/freetype/internal/ftobjs.h"
|
| -#include "../../include/freetype/internal/ftserv.h"
|
| -#include "../../include/freetype/internal/services/svpsinfo.h"
|
| +#include <ft2build.h>
|
| +#include FT_INTERNAL_DEBUG_H
|
| +#include FT_INTERNAL_OBJECTS_H
|
| +#include FT_INTERNAL_SERVICE_H
|
| +#include FT_SERVICE_POSTSCRIPT_INFO_H
|
|
|
|
|
| /* documentation is in t1tables.h */
|
| @@ -28,19 +29,22 @@
|
| FT_Get_PS_Font_Info( FT_Face face,
|
| PS_FontInfoRec* afont_info )
|
| {
|
| - FT_Error error = FT_ERR( Invalid_Argument );
|
| + FT_Error error;
|
| + FT_Service_PsInfo service;
|
|
|
|
|
| - if ( face )
|
| - {
|
| - FT_Service_PsInfo service = NULL;
|
| + if ( !face )
|
| + return FT_THROW( Invalid_Face_Handle );
|
|
|
| + if ( !afont_info )
|
| + return FT_THROW( Invalid_Argument );
|
|
|
| - FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
|
| + FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
|
|
|
| - if ( service && service->ps_get_font_info )
|
| - error = service->ps_get_font_info( face, afont_info );
|
| - }
|
| + if ( service && service->ps_get_font_info )
|
| + error = service->ps_get_font_info( face, afont_info );
|
| + else
|
| + error = FT_THROW( Invalid_Argument );
|
|
|
| return error;
|
| }
|
| @@ -51,8 +55,8 @@
|
| FT_EXPORT_DEF( FT_Int )
|
| FT_Has_PS_Glyph_Names( FT_Face face )
|
| {
|
| - FT_Int result = 0;
|
| - FT_Service_PsInfo service = NULL;
|
| + FT_Int result = 0;
|
| + FT_Service_PsInfo service;
|
|
|
|
|
| if ( face )
|
| @@ -73,19 +77,22 @@
|
| FT_Get_PS_Font_Private( FT_Face face,
|
| PS_PrivateRec* afont_private )
|
| {
|
| - FT_Error error = FT_ERR( Invalid_Argument );
|
| + FT_Error error;
|
| + FT_Service_PsInfo service;
|
|
|
|
|
| - if ( face )
|
| - {
|
| - FT_Service_PsInfo service = NULL;
|
| + if ( !face )
|
| + return FT_THROW( Invalid_Face_Handle );
|
|
|
| + if ( !afont_private )
|
| + return FT_THROW( Invalid_Argument );
|
|
|
| - FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
|
| + FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
|
|
|
| - if ( service && service->ps_get_font_private )
|
| - error = service->ps_get_font_private( face, afont_private );
|
| - }
|
| + if ( service && service->ps_get_font_private )
|
| + error = service->ps_get_font_private( face, afont_private );
|
| + else
|
| + error = FT_THROW( Invalid_Argument );
|
|
|
| return error;
|
| }
|
|
|