Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/freetype/src/cff/cf2intrp.c

Issue 815103002: Update freetype to 2.5.4. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Adjust GYP and GN Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/freetype/src/cff/cf2intrp.h ('k') | third_party/freetype/src/cff/cf2read.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/freetype/src/cff/cf2intrp.c
diff --git a/core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2intrp.c b/third_party/freetype/src/cff/cf2intrp.c
similarity index 96%
rename from core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2intrp.c
rename to third_party/freetype/src/cff/cf2intrp.c
index fc111000126648594a3cd760424054ed2496b0d3..a26960669f171114357d8694f664568b8d4fcea2 100644
--- a/core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2intrp.c
+++ b/third_party/freetype/src/cff/cf2intrp.c
@@ -4,7 +4,7 @@
/* */
/* Adobe's CFF Interpreter (body). */
/* */
-/* Copyright 2007-2013 Adobe Systems Incorporated. */
+/* Copyright 2007-2014 Adobe Systems Incorporated. */
/* */
/* This software, and all works of authorship, whether in source or */
/* object code form as indicated by the copyright notice(s) included */
@@ -37,7 +37,7 @@
#include "cf2ft.h"
-#include "../../include/freetype/internal/ftdebug.h"
+#include FT_INTERNAL_DEBUG_H
#include "cf2glue.h"
#include "cf2font.h"
@@ -464,6 +464,7 @@
CF2_HintMaskRec hintMask;
CF2_GlyphPathRec glyphPath;
+
/* initialize the remaining objects */
cf2_arrstack_init( &subrStack,
memory,
@@ -592,8 +593,11 @@
/* never add hints after the mask is computed */
if ( cf2_hintmask_isValid( &hintMask ) )
+ {
FT_TRACE4(( "cf2_interpT2CharString:"
" invalid horizontal hint mask\n" ));
+ break;
+ }
cf2_doStems( font,
opStack,
@@ -613,8 +617,11 @@
/* never add hints after the mask is computed */
if ( cf2_hintmask_isValid( &hintMask ) )
+ {
FT_TRACE4(( "cf2_interpT2CharString:"
" invalid vertical hint mask\n" ));
+ break;
+ }
cf2_doStems( font,
opStack,
@@ -643,7 +650,6 @@
curY += cf2_stack_popFixed( opStack );
cf2_glyphpath_moveTo( &glyphPath, curX, curY );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
break;
@@ -661,7 +667,6 @@
curY += cf2_stack_getReal( opStack, index + 1 );
cf2_glyphpath_lineTo( &glyphPath, curX, curY );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
}
cf2_stack_clear( opStack );
@@ -692,7 +697,6 @@
isX = !isX;
cf2_glyphpath_lineTo( &glyphPath, curX, curY );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
}
cf2_stack_clear( opStack );
@@ -720,7 +724,6 @@
cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
curX = x3;
curY = y3;
@@ -733,7 +736,6 @@
curY += cf2_stack_getReal( opStack, index + 1 );
cf2_glyphpath_lineTo( &glyphPath, curX, curY );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
}
cf2_stack_clear( opStack );
@@ -1145,15 +1147,16 @@
/* `cf2_hintmask_read' (which also traces the mask bytes) */
FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" ));
- /* if there are arguments on the stack, there this is an */
- /* implied cf2_cmdVSTEMHM */
- if ( cf2_stack_count( opStack ) != 0 )
+ /* never add hints after the mask is computed */
+ if ( cf2_stack_count( opStack ) > 1 &&
+ cf2_hintmask_isValid( &hintMask ) )
{
- /* never add hints after the mask is computed */
- if ( cf2_hintmask_isValid( &hintMask ) )
- FT_TRACE4(( "cf2_interpT2CharString: invalid hint mask\n" ));
+ FT_TRACE4(( "cf2_interpT2CharString: invalid hint mask\n" ));
+ break;
}
+ /* if there are arguments on the stack, there this is an */
+ /* implied cf2_cmdVSTEMHM */
cf2_doStems( font,
opStack,
&vStemHintArray,
@@ -1227,7 +1230,6 @@
curX += cf2_stack_popFixed( opStack );
cf2_glyphpath_moveTo( &glyphPath, curX, curY );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
break;
@@ -1246,7 +1248,6 @@
curX += cf2_stack_popFixed( opStack );
cf2_glyphpath_moveTo( &glyphPath, curX, curY );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
break;
@@ -1264,7 +1265,6 @@
curY += cf2_stack_getReal( opStack, index + 1 );
cf2_glyphpath_lineTo( &glyphPath, curX, curY );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
index += 2;
}
@@ -1279,7 +1279,6 @@
cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
curX = x3;
curY = y3;
@@ -1319,7 +1318,6 @@
y3 = cf2_stack_getReal( opStack, index + 3 ) + y2;
cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
curX = x3;
curY = y3;
@@ -1359,7 +1357,6 @@
y3 = y2;
cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
curX = x3;
curY = y3;
@@ -1426,7 +1423,6 @@
}
cf2_glyphpath_curveTo( &glyphPath, x1, y1, x2, y2, x3, y3 );
- if (glyphPath.callbacks && glyphPath.callbacks->error && *glyphPath.callbacks->error) goto exit;
curX = x3;
curY = y3;
« no previous file with comments | « third_party/freetype/src/cff/cf2intrp.h ('k') | third_party/freetype/src/cff/cf2read.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698