| Index: third_party/freetype/src/cff/cffgload.c
|
| diff --git a/core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cffgload.c b/third_party/freetype/src/cff/cffgload.c
|
| similarity index 98%
|
| rename from core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cffgload.c
|
| rename to third_party/freetype/src/cff/cffgload.c
|
| index bbb75ab92441f0dfecd8cd01cf9cefe9a22ea0ec..758a3d3bbd1e164079a88d02c84f6eed89eb3d0b 100644
|
| --- a/core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cffgload.c
|
| +++ b/third_party/freetype/src/cff/cffgload.c
|
| @@ -4,7 +4,7 @@
|
| /* */
|
| /* OpenType Glyph Loader (body). */
|
| /* */
|
| -/* Copyright 1996-2013 by */
|
| +/* Copyright 1996-2014 by */
|
| /* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
| /* */
|
| /* This file is part of the FreeType project, and may only be used, */
|
| @@ -16,12 +16,12 @@
|
| /***************************************************************************/
|
|
|
|
|
| -#include "../../include/ft2build.h"
|
| -#include "../../include/freetype/internal/ftdebug.h"
|
| -#include "../../include/freetype/internal/ftstream.h"
|
| -#include "../../include/freetype/internal/sfnt.h"
|
| -#include "../../include/freetype/ftoutln.h"
|
| -#include "../../include/freetype/ftcffdrv.h"
|
| +#include <ft2build.h>
|
| +#include FT_INTERNAL_DEBUG_H
|
| +#include FT_INTERNAL_STREAM_H
|
| +#include FT_INTERNAL_SFNT_H
|
| +#include FT_OUTLINE_H
|
| +#include FT_CFF_DRIVER_H
|
|
|
| #include "cffobjs.h"
|
| #include "cffload.h"
|
| @@ -434,7 +434,7 @@
|
| goto Exit;
|
| }
|
|
|
| - FT_TRACE3(( "glyph index %d (subfont %d):\n", glyph_index, fd_index ));
|
| + FT_TRACE3(( " in subfont %d:\n", fd_index ));
|
|
|
| sub = cff->subfonts[fd_index];
|
|
|
| @@ -447,10 +447,6 @@
|
| builder->hints_globals = (void *)internal->subfonts[fd_index];
|
| }
|
| }
|
| -#ifdef FT_DEBUG_LEVEL_TRACE
|
| - else
|
| - FT_TRACE3(( "glyph index %d:\n", glyph_index ));
|
| -#endif
|
|
|
| decoder->num_locals = sub->local_subrs_index.count;
|
| decoder->locals = sub->local_subrs;
|
| @@ -707,7 +703,7 @@
|
| /* callback function. */
|
| if ( face->root.internal->incremental_interface )
|
| {
|
| - FT_Data data;
|
| + FT_Data data;
|
|
|
|
|
| data.pointer = *pointer;
|
| @@ -1183,9 +1179,9 @@
|
| case 37:
|
| op = cff_op_flex1;
|
| break;
|
| - /*default: */ /* XYQ 2007-9-6: we can't just quit if we see some reserved op */
|
| - /* decrement ip for syntax error message */
|
| - /* ip--;*/
|
| + default:
|
| + FT_TRACE4(( " unknown op (12, %d)\n", v ));
|
| + break;
|
| }
|
| }
|
| break;
|
| @@ -1316,10 +1312,6 @@
|
| args -= req_args;
|
| num_args -= req_args;
|
|
|
| - /* Sunliang.Liu sync 221's revison. */
|
| - if (args > decoder->stack + CFF_MAX_OPERANDS)
|
| - goto Stack_Overflow;
|
| -
|
| /* At this point, `args' points to the first argument of the */
|
| /* operand in case `req_args' isn't zero. Otherwise, we have */
|
| /* to adjust `args' manually. */
|
| @@ -1997,9 +1989,6 @@
|
| }
|
| else
|
| {
|
| - if ( !error )
|
| - error = FT_Err_Ok;
|
| -
|
| cff_builder_close_contour( builder );
|
|
|
| /* close hints recording session */
|
| @@ -2010,10 +1999,12 @@
|
| goto Syntax_Error;
|
|
|
| /* apply hints to the loaded glyph outline now */
|
| - hinter->apply( hinter->hints,
|
| - builder->current,
|
| - (PSH_Globals)builder->hints_globals,
|
| - decoder->hint_mode );
|
| + error = hinter->apply( hinter->hints,
|
| + builder->current,
|
| + (PSH_Globals)builder->hints_globals,
|
| + decoder->hint_mode );
|
| + if ( error )
|
| + goto Fail;
|
| }
|
|
|
| /* add current outline to the glyph slot */
|
| @@ -2719,10 +2710,10 @@
|
|
|
| /* compute linear advance widths */
|
|
|
| - ( (SFNT_Service)face->sfnt )->get_metrics( face, 0,
|
| - glyph_index,
|
| - &dummy,
|
| - &advance );
|
| + (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 0,
|
| + glyph_index,
|
| + &dummy,
|
| + &advance );
|
| glyph->root.linearHoriAdvance = advance;
|
|
|
| has_vertical_info = FT_BOOL(
|
| @@ -2732,10 +2723,10 @@
|
| /* get the vertical metrics from the vtmx table if we have one */
|
| if ( has_vertical_info )
|
| {
|
| - ( (SFNT_Service)face->sfnt )->get_metrics( face, 1,
|
| - glyph_index,
|
| - &dummy,
|
| - &advance );
|
| + (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1,
|
| + glyph_index,
|
| + &dummy,
|
| + &advance );
|
| glyph->root.linearVertAdvance = advance;
|
| }
|
| else
|
| @@ -2972,10 +2963,10 @@
|
| FT_UShort vertAdvance = 0;
|
|
|
|
|
| - ( (SFNT_Service)face->sfnt )->get_metrics( face, 1,
|
| - glyph_index,
|
| - &vertBearingY,
|
| - &vertAdvance );
|
| + (void)( (SFNT_Service)face->sfnt )->get_metrics( face, 1,
|
| + glyph_index,
|
| + &vertBearingY,
|
| + &vertAdvance );
|
| metrics->vertBearingY = vertBearingY;
|
| metrics->vertAdvance = vertAdvance;
|
| }
|
|
|