[cairo-commit] src/cairo-svg-surface.c

Emmanuel Pacaud emmanuel at kemper.freedesktop.org
Sat May 6 06:33:24 PDT 2006


 src/cairo-svg-surface.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

New commits:
diff-tree 7d0bcc3f1cf5dff292289420c3e5e73410997993 (from 1da2ca0f3575fe00e7e3f2ce27cf0e3416517573)
Author: Emmanuel Pacaud <emmanuel.pacaud at free.fr>
Date:   Sat May 6 15:31:53 2006 +0200

    SVG: Emit glyphs at the beginning of defs section.

diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 2ad4d61..931e115 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -100,6 +100,7 @@ struct cairo_svg_document {
     xmlDocPtr	xml_doc;
     xmlNodePtr	xml_node_defs;
     xmlNodePtr  xml_node_main;
+    xmlNodePtr	xml_node_glyphs;
 
     unsigned int surface_id;
     unsigned int linear_pattern_id;
@@ -751,7 +752,8 @@ _cairo_svg_document_emit_glyph (cairo_sv
 					  _cairo_svg_path_close_path,
 					  &info);
 
-    symbol = xmlNewChild (document->xml_node_defs, NULL, CC2XML ("symbol"), NULL);
+    symbol = xmlNewChild (document->xml_node_glyphs, NULL, 
+			  CC2XML ("symbol"), NULL);
     snprintf (buffer, sizeof buffer, "glyph%d-%d", 
 	      svg_font->output_font,
 	      svg_glyph->output_glyph);
@@ -2056,6 +2058,9 @@ _cairo_svg_document_create (cairo_output
     xmlNewNs (node, CC2XML ("http://www.w3.org/2000/svg"), NULL);
     xmlNewNs (node, CC2XML ("http://www.w3.org/1999/xlink"), CC2XML ("xlink"));
 
+    document->xml_node_glyphs = xmlNewChild (document->xml_node_defs, NULL,
+					     CC2XML ("g"), NULL);
+
     document->alpha_filter = FALSE;
 
     _cairo_array_init (&document->meta_snapshots, sizeof (cairo_meta_snapshot_t));


More information about the cairo-commit mailing list