Closed su-v closed 10 years ago
Which variant do you propose to use in InklingReader?
I'd go for second or third, as it comes from a real drawing on paper, where mm units make sense.
I went with the second. Using the mm sizes for both doesn't play nice with librsvg, so I used a constant to calculate the correct value.
SVG documents with page size in real units should use a viewBox attribute to define the scale, e.g.
or
or
The last one redefines the SVG user unit for the document as 1mm, the other two match an A4 page based on (Inkscape's current) 90dpi internal resolution for the 'px' SVG user unit.
While current stable Inkscape never adds this attribute itself to new documents, this has changed in inkscape trunk (for upcoming major release 0.91), and should probably be used in the SVG files exported by inklingreader too (otherwise the documents might render differently in different SVG viewers).
See also: http://www.w3.org/TR/SVG11/coords.html#ViewBoxAttribute
… and for example two recent discussions on the inkscape-devel mailing list (since improved viewBox support is part of the unit refactoring which landed in Inkscape trunk last year): http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/43281 http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/43430