Hacker News new | ask | show | jobs
by therealunreal 1843 days ago
I found this a few days ago when I was researching SVG in Flutter. After the initial "why not SVG?" reaction, this is not that bad! As the README says, It is a format for efficient presentation, not an authoring format. You're supposed to author in SVG etc and then export to IVG.

However, SVG Native [1] seems to be very similar, and it's also a subset of SVG, and non-binary.

1: https://svgwg.org/specs/svg-native/

2 comments

SVG in Flutter still leaves a lot to be desired. We've ended up building a subset of SVG that can be composed using const code that fills some of the missing gaps in packages like flutter_svg.
That looked interesting until I got to this quote:

"SVG Native is a standalone file type, expected to be rendered with a dedicated-purpose renderer. Therefore, SVG Native content must not be present as part of a larger XML (or HTML) document. If it is present as part of a larger XML (or HTML) document, the content should be interpreted as SVG proper."

So in other words, no SVG native in the browser.

I would have assumed that meant it shouldn't be included inline; that referencing it via URL is fine. Do we know which they mean?

Edit- found this: "If a Web author desires to use SVG Native on the Web, the img element may be used instead"