[PATCH] [cairo-gstate] Check scaled font status.

Chris Wilson chris at chris-wilson.co.uk
Sun May 27 03:40:47 PDT 2007


After using the public API to access the scaled font, which only sets
the status field in the font, check the scaled font status. This will
then correctly propagate errors during glyph loading to the context.
---
 src/cairo-gstate.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 377ebc4..61445cb 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -1494,7 +1494,7 @@ _cairo_gstate_get_font_extents (cairo_gstate_t *gstate,
 
     cairo_scaled_font_extents (gstate->scaled_font, extents);
 
-    return CAIRO_STATUS_SUCCESS;
+    return cairo_scaled_font_status (gstate->scaled_font);
 }
 
 cairo_status_t
@@ -1548,7 +1548,7 @@ _cairo_gstate_glyph_extents (cairo_gstate_t *gstate,
 				     glyphs, num_glyphs,
 				     extents);
 
-    return CAIRO_STATUS_SUCCESS;
+    return cairo_scaled_font_status (gstate->scaled_font);
 }
 
 #define STACK_GLYPHS_LEN ((int) (CAIRO_STACK_BUFFER_SIZE / sizeof (cairo_glyph_t)))
-- 
1.4.4.2


--0eh6TmSyL6TZE2Uz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="0001-cairo-gstate-Check-status-on-existing-fonts.txt"



More information about the cairo mailing list