summaryrefslogtreecommitdiff
path: root/src/cairo-svg-surface.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-05-15 09:28:32 -0700
committerCarl Worth <cworth@cworth.org>2006-05-15 09:34:27 -0700
commite2c03d51daa60bf18b66ace148e6f8df7c454e2c (patch)
tree6676a5ede45159545b43ad2bcafca96974a8a5e1 /src/cairo-svg-surface.c
parentf500cef19f049a4a0ed296172618db2f26794932 (diff)
Change scaled_font_subsets_callback to have return type of void.
The return of status from this callback was misleading. The function actually calling the callback was also a hash table callback function, which itself is void---so any status value returned was being lost. Instead, we now stash any errors that occur during the fallback into surface->status.
Diffstat (limited to 'src/cairo-svg-surface.c')
-rw-r--r--src/cairo-svg-surface.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 3bd51218f..8a0fd97f0 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -545,7 +545,7 @@ _cairo_svg_path_close_path (void *closure)
return CAIRO_STATUS_SUCCESS;
}
-static cairo_status_t
+static void
_cairo_svg_document_emit_glyph (cairo_svg_document_t *document,
cairo_scaled_font_t *scaled_font,
unsigned long scaled_font_glyph_index,
@@ -572,8 +572,10 @@ _cairo_svg_document_emit_glyph (cairo_svg_document_t *document,
CAIRO_SCALED_GLYPH_INFO_METRICS|
CAIRO_SCALED_GLYPH_INFO_SURFACE,
&scaled_glyph);
- if (status)
- return status;
+ if (status) {
+ _cairo_surface_set_error (document->owner, status);
+ return;
+ }
info.document = document;
info.path = xmlBufferCreate ();
@@ -597,28 +599,21 @@ _cairo_svg_document_emit_glyph (cairo_svg_document_t *document,
xmlSetProp (child, CC2XML ("style"), CC2XML ("stroke: none;"));
xmlBufferFree (info.path);
-
- return CAIRO_STATUS_SUCCESS;
}
-static cairo_status_t
+static void
_cairo_svg_document_emit_font_subset (cairo_scaled_font_subset_t *font_subset,
void *closure)
{
cairo_svg_document_t *document = closure;
- cairo_status_t status;
int i;
for (i = 0; i < font_subset->num_glyphs; i++) {
- status = _cairo_svg_document_emit_glyph (document,
- font_subset->scaled_font,
- font_subset->glyphs[i],
- font_subset->font_id, i);
- if (status)
- return status;
+ _cairo_svg_document_emit_glyph (document,
+ font_subset->scaled_font,
+ font_subset->glyphs[i],
+ font_subset->font_id, i);
}
-
- return CAIRO_STATUS_SUCCESS;
}
static void