←back to thread

Nice things with SVG

(fuma-nama.vercel.app)
571 points fmerian | 3 comments | | HN request time: 0.683s | source
Show context
rckt ◴[] No.43666799[source]
SVG feels like a very underexplored and underused territory. You can do so many things with it. It really depends on your imagination. But you’ll possibly need to “hardcore” a lot of stuff, so yeah, depends on the use case as well.
replies(5): >>43666860 #>>43666997 #>>43667408 #>>43669839 #>>43670409 #
1. geokon ◴[] No.43670409[source]
It's a fun format that's easy to generate, but after trying to do complicated things with it.. you kind of understand why. It's underused b/c

- Complex graphics render different in different browsers. So you can't rely on it shows up the same (never had the same issue with a PDF for example)

- There are quite a few renderers but they typically don't implement large parts of SVG b/c it's too complex.. So you can never really be sure what parts are "safe" to use.

- Large complex graphics display extremely slowly (again, compared to a PDF)

- There is basically one editor.. Inkscape. And it's got it's own quirks and doesn't match Chrome/Firefox's behavior. Ex: You can add arrows to lines in Inkscape and they don't display in Firefox

It's also just got too many weird corner case limitations. For instance you can embed a SVG in another SVG (say to make a composite diagram). But you can't embed a SVG in to an SVG in to an SVG. On the web if you inline or link an SVG you also end up with different behaviors

replies(1): >>43670759 #
2. Springtime ◴[] No.43670759[source]
> There is basically one editor.. Inkscape.

Do you mean in terms of open source vector editors? As there a wide variety of tools with SVG authoring/editing capability, among the most well-known being Adobe Illustrator, Sketch, Affinity Photo/Designer, even some web apps are available that were made for online SVG editing (eg: SVGator).

Inkscape, like some tools such as Affinity's, adds its own XML namespace with custom attributes and values, though for arrows I would expect it to use native `marker` elements.

It's certainly true that with SVG's flexibility and particularly with cross-browser handling differences/bugs it can become its own task to get consistent presentation when doing more complex things with it. Still very fond of the format.

replies(1): >>43672362 #
3. jarek-foksa ◴[] No.43672362[source]
Inkscape is the only major vector graphics editor that relies on SVG as its native file format. Most other apps are merely allowing you to import/export SVG files which is often a lossy process (e.g. vector objects with filter effects might get rasterized).

SVGator is focused primarily on animation and it's rather pricey. Boxy SVG might be a better choice if you are looking for a web-based SVG editor (disclaimer: I'm the developer).