[cairo-commit] libsvg/src svg_parser.c,1.37,1.38
Keith Packard
commit at pdx.freedesktop.org
Thu Dec 1 10:50:25 PST 2005
Committed by: keithp
Update of /cvs/cairo/libsvg/src
In directory gabe:/tmp/cvs-serv12709/src
Modified Files:
svg_parser.c
Log Message:
2005-12-01 Keith Packard <keithp at keithp.com>
* src/svg_parser.c: (_svg_parser_parse_text_characters):
Oops - text elements get characters in chunks when there
are non-trivial entities in the string.
Also, glue all of the text into a single implicit tspan
Index: svg_parser.c
===================================================================
RCS file: /cvs/cairo/libsvg/src/svg_parser.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- svg_parser.c 1 Dec 2005 18:29:47 -0000 1.37
+++ svg_parser.c 1 Dec 2005 18:50:22 -0000 1.38
@@ -832,14 +832,17 @@
if (text == NULL)
return SVG_STATUS_PARSE_ERROR;
- if (parser->state->tspan)
+ if (parser->state->tspan && !parser->state->tspan->from_text)
return SVG_STATUS_SUCCESS;
- status = _svg_parser_parse_tspan (parser, NULL, &tspan);
- if (status)
- return status;
-
- tspan->e.tspan.from_text = 1;
+ if (!parser->state->tspan)
+ {
+ status = _svg_parser_parse_tspan (parser, NULL, &tspan);
+ if (status)
+ return status;
+
+ tspan->e.tspan.from_text = 1;
+ }
status = _svg_parser_parse_tspan_characters (parser, ch, len);
if (status)
More information about the cairo-commit
mailing list