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

Unified Diff: core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2ft.c

Issue 294353002: Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong characters represe… (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Patch Set after rebase Created 6 years, 7 months 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
Index: core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2ft.c
diff --git a/core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2ft.c b/core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2ft.c
index 4311d107567167fd56e157a2d3df99e7cbfe9231..7f82b247af28094df42b5c26d714d6cfedbfe2f2 100644
--- a/core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2ft.c
+++ b/core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2ft.c
@@ -143,6 +143,7 @@
/* downcast the object pointer */
CF2_Outline outline = (CF2_Outline)callbacks;
CFF_Builder* builder;
+ FT_Error error;
FT_ASSERT( outline && outline->decoder );
@@ -154,15 +155,18 @@
{
/* record the move before the line; also check points and set */
/* `path_begun' */
- cff_builder_start_point( builder,
+ error = cff_builder_start_point(builder,
params->pt0.x,
params->pt0.y );
+ if (callbacks && callbacks->error) *callbacks->error = error;
+ if (error) return;
}
/* `cff_builder_add_point1' includes a check_points call for one point */
- cff_builder_add_point1( builder,
+ error = cff_builder_add_point1(builder,
params->pt1.x,
params->pt1.y );
+ if (callbacks && callbacks->error) *callbacks->error = error;
}
@@ -173,6 +177,7 @@
/* downcast the object pointer */
CF2_Outline outline = (CF2_Outline)callbacks;
CFF_Builder* builder;
+ FT_Error error;
FT_ASSERT( outline && outline->decoder );
@@ -184,13 +189,17 @@
{
/* record the move before the line; also check points and set */
/* `path_begun' */
- cff_builder_start_point( builder,
+ error = cff_builder_start_point( builder,
params->pt0.x,
params->pt0.y );
+ if (callbacks && callbacks->error) *callbacks->error = error;
+ if (error) return;
}
/* prepare room for 3 points: 2 off-curve, 1 on-curve */
- cff_check_points( builder, 3 );
+ error = cff_check_points( builder, 3 );
+ if (callbacks && callbacks->error) *callbacks->error = error;
+ if (error) return;
cff_builder_add_point( builder,
params->pt1.x,
« no previous file with comments | « core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2font.c ('k') | core/src/fxge/fx_freetype/fxft2.5.01/src/cff/cf2hints.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698