Comment 103 for bug 168261

Revision history for this message
Stefan Roettger (stefan-stereofx) wrote :

I have the same problem with Firefox. I've read the according bug report on mozilla bugtracker relating to html:img not supporting svgs and it does not look like it is going to be solved anytime soon. With Safari svg images work flawless and I can rescale them to any size. With Firefox I have to use embed or object which does not provide scaling of svg images with the output as is currently produced by Inkscape.

So my suggestion is as simple as this (sorry if this has been suggested already in a different post):

Provide something like a checkbox in the Inkscape preferences that when enabled writes an additional viewbox tag into the svg file with the viewbox corresponding to the actual document size.

I've simulated this by hand by adding "viewBox='0 0 500 500'" to my svg file, for example. With that the svg does display and scale nicely in both Safari and Firefox and it is scalabe by setting the width attribute of the embedding object, e.g. <object width=100 data=file.svg />.

Without the viewBox tag I get the ugly scroll bars when I resize the embedding object. That's not exactly the behavior I would expect of a __Scalable__ Vector Graphics. Without the viewBox tag, the Inkscape output is merely a VG without the S, which makes a vector graphic basically useless.

So in summary, I do propose a "Make viewbox fit document" checkbox by exporting the corresponding viewBox tag!

Sure, I can add the tag by hand, but it is sooooo essential for a vector graphic to be scalable and such a checkbox would be soooooooo nice and easy to implement, not even a GUI required ;-)

Thanks,
Stefan Roettger, www.stereofx.org