[cairo] Cairo and SVG

Emmanuel Pacaud emmanuel.pacaud at lapp.in2p3.fr
Mon Dec 24 01:33:44 PST 2007


Le dimanche 23 décembre 2007 à 15:23 -0800, Alan W. Irwin a écrit :
> On 2007-12-23 11:05+0100 Emmanuel Pacaud wrote:
> 
> > The text output of the cairo SVG backend uses the <symbol> element. And
> > it looks the imagemagick display command doesn't support it correctly. I
> > guess that's also the case for the OSX SVG viewer.
> 
> Could you expand on the above remarks?  For example, it is not clear whether
> you have confirmed the dropped text problem I found when using the
> ImageMagick "display" command to view results from the cairo SVG backend.
> Furthermore, have you found a bug report or some additional concrete
> evidence that the "display" command does not support the symbol tag
> correctly?

I have concrete evidence that Inkscape, librsvg, mozilla and batik
display correctly the text in the SVG files produced byt he cairo SVG
backend.

Imagemagick display command doesn't. And fails to render the following
test:

http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-struct-symbol-01-b.html

> Note, your hypothesis that the problem is due to ImageMagick is supported by
> SVG validation results I just obtained.  I have attached compressed svgcairo
> results from our example 10 (the corresponding pngcairo results can be found
> at http://plplot.sourceforge.net/examples-data/demo10/x10.01.png). The
> uncompressed version of that file
> validates at http://validator.w3.org/.  There are further more interesting
> validation results using the file validator at
> http://jiggles.w3.org/svgvalidator/.  The file upload to that validation
> site does not work properly.  However, I downloaded that validator, and it
> reported the following results:

This is a validator for SVG 1.0 only...

> irwin at raven> java -jar svgvalidator.jar /tmp/examples/c/testcairo.svg
> 1 file was validated:
> /tmp/examples/c/testcairo.svg validation report:
> 2 errors were found.
> error #1: line: 2
> The 'version' attribute of the <svg> element has a fixed value: it can not
> be changed.

... which explains why it throws an error here.

> error #2: line: 15
> The 'd' attribute of the <path> element is required: a value must be
> specified.

> <symbol overflow="visible" id="glyph0-3">
> <path style="stroke: none;" d=""/>
> </symbol>

Looks like a bug in the validator here. I don't think an empty d
attribute is an error. May be I'm wrong. I just hope any sane renderer
would not stop the rendering on this sort of issue.

	Emmanuel.



More information about the cairo mailing list