A few weeks ago, for designing the W3C Chairs tee, I have used a vector authoring tool, OmniGraffle.
We asked me for an SVG version of the bots. Omnigraffle has an “export as SVG” feature, like many modern vector tools. I had the curiosity of looking at the source code… All my beautiful squares and circles were gone. All shapes were only defined by paths. Some shapes are rightfully defined by paths, but it should not be the case for all of them. I became curious about this issue.
When using a vector authoring tool, be omnigraffle, inkscape, illustrator, etc., for drawing simple shapes such as circle and rectangle, I use the menu.
These menus have a graphical semantics. There is actually a square or a circle to represent the shape. For a square, I’m not drawing 4 paths but a real square. I want the authoring tool to retain my semantics choices when possible. Imagine an HTML editor which would convert all your paragraphs in series of
<br/> instead of
<p>…</p> (yes those exist too). For a square in the authoring tool, I would like to have a
rect inside the SVG file. For example, a 50 pixels by 50 pixels square should give:
<rect x="1" y="1" width="50" height="50" fill="none" stroke="black" stroke-width="1"/>
We can even go further. Many vector authoring tools have the capabilities of groups and layers. These information could be used for creating groups of shapes and/or labeling shapes with unique identifiers
I discussed about it with Doug Scheppers, SVG Working Group Staff Contact, who is in the office in Japan these days. We don’t know any SVG authoring tools which preserve the semantics. If you know one, please leave a comment. And I said that would be part of optional or mandatory requirements of a future version of SVG for the authoring tools class of products. Doug has created issue 2178 in the SVG Working Group tracker. In the mean time, I will have to redo my bots by hands ;)