Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong...
[pdfium.git] / core / src / fxge / fx_freetype / fxft2.5.01 / src / cff / cf2ft.c
index 4311d10..7f82b24 100644 (file)
     /* downcast the object pointer */
     CF2_Outline   outline = (CF2_Outline)callbacks;
     CFF_Builder*  builder;
+       FT_Error          error;
 
 
     FT_ASSERT( outline && outline->decoder );
     {
       /* 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;
   }
 
 
     /* downcast the object pointer */
     CF2_Outline   outline = (CF2_Outline)callbacks;
     CFF_Builder*  builder;
+       FT_Error          error;
 
 
     FT_ASSERT( outline && outline->decoder );
     {
       /* 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,