rasem
rasem copied to clipboard
Attributes (e.g., viewBox) on root element
For SVGs we generate, we need to have attributes on the root node, e.g., viewBox
, class
, and style
. I don't see a documented or spec'ed way to do this.
I want to do the same. XRVG allows you to specify the width and height, but not viewBox. I'm just going to post-process the svg file (from within the same script that renders the svg file) to edit the line myself. Weird that both of these library authors didn't give access to these critical attributes. I'm generating svg to import into CorelDraw (and eventually to CNC), so I need to make sure an inch in my script winds up as an inch in CorelDraw.