Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Importing SVGs

Open Keavon opened this issue 2 years ago • 1 comments

We won't be able to support every feature of the SVG spec, but working on supporting this will help us move towards adding more features that SVG provides that we've forgotten about so far. Before we transition to the node system, we can probably reach a happy middleground of supporting most common SVG features. Overly complex SVGs might not end up looking the same once imported, but we can't strive for perfection quite yet.

Keavon avatar May 04 '22 20:05 Keavon

We may be able to use an existing test suite such as https://www.w3.org/Graphics/SVG/WG/wiki/Test_Suite_Overview#SVG_1.1_Second_Edition_Test_Suite:_16_August_2011 or other to test the flow of Import SVG into Graphite -> export back to SVG. Even just a bunch of SVG files using a variety of SVG capabilities would be helpful as a test suite. Then as tests fail, we know what features are missing and we can add support for those as user-facing capabilities in the editor.

Keavon avatar May 26 '22 02:05 Keavon

Hi, I tried Import SVG at https://editor.graphite.rs/ and it does work :) How can one select objects in the imported SVG afterwards? I can only select the entire SVG object.

Thanks!

mariusa avatar Jan 08 '23 10:01 mariusa

Hi, thanks for trying the editor! I've clarified the title of this issue. You can indeed import an SVG as an image file and it is treated no differently than a JPG or PNG. But we unfortunately have no support yet for parsing the SVG file and generating Graphite-specific layer data. That is what this issue is about.

Keavon avatar Jan 08 '23 11:01 Keavon