[cairo] svg_cairo_get_size problem
Jason Dorje Short
jdorje at users.sf.net
Fri Jun 24 10:36:33 PDT 2005
Carl Worth wrote:
> Does that make sense? Is there anything else I'm missing here?
Your explanation makes sense. But what you're missing is how it can be
fixed. Maybe the SVG file is broken but a large portion of SVGs are
broken in this way, and the users of libsvg-cairo often aren't in a
position to fix them.
The two SVGs I sent were from the sodipodi clip art
(http://www.sodipodi.com/index.php3?section=clipart). Of the hundred or
so SVGs I have from there, about half of them are drawn incorrectly
using libsvg-cairo. Yet these render fine in inkscape, sodipodi, and
Yet looking at the file I don't see how you can infer 90 DPI. According
to http://www.inkscape.org/cgi-bin/wiki.pl?ReleaseNotes041 inkscape uses
90 DPI as the default. Maybe looking in the inkscape/sodipodi or
librsvg code you could find out how they determine the 90 DPI value. Or
maybe it would be best just to assume 90 DPI (instead of assuming 100
DPI as is apparently done now).
The attached patch changes the default DPI in libsvg and libsvg-cairo
from 100.0 to 90.0. (This also highlights a bug where libsvg-cairo
makes a separate assumption about DPI, rather than having a way to
access libsvg's DPI value. I'd suggest an accessor function should be
added for this.)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1335 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050624/3a389b13/dpi.bin
More information about the cairo