Hacker News new | past | comments | ask | show | jobs | submit login

I've always thought SVG was a terrible format and I hate that it has become synonymous with "vector". The only thing it has is interoperability because of XML. Any binary format would be more performant. Then we have Inkscape that is basically a SVG editor so it has to stay compatible with the SVG standard. Proprietary vector image editors like Affinity, Illustrator, and Corel Paint all use their own formats, so they can add and change any functionality they want. It's just Inkscape that's confined to SVG.

That said, I don't think a single vector file is a good solution for icons. If you take a look at Windows 98 icons[1], you'll see that many icons are manually re-drawn for lower resolutions, which is something that ICO format can do which nobody else can do for some reason. A simple example is the calendar icon. Because a calendar has a "grid" for all 7 days of the week, it would need to have 6 vertical lines, which would look too busy in 16x16. So the 16x16 icon just uses fewer grid lines instead of turning everything into a blurry mess.

Anecdotally, I've tried using 16x16 pixel icons on the web before, but fractional scaling made them look bad on my phone.

1. https://win98icons.alexmeub.com/




SVG has a lot of warts, but it actually has two big things going for it: it's everywhere, and it's DOM-programmable. Anyone who knows js can start animating SVGs the same way they animate the DOM. It is somewhat more primitive, given how z-ordering is source-code dependent, and its weird compound attribute values for things like transforms. It's also true that if you try to code seriously with raw SVG you're just going to redefine a new library like D3 or Three.js or chart.js, but worse.


Inkscape is not really "confined" to svg, because saving to pure svg is lossy. Only svg with extra specific inkscape metadata is lossless- clearly legit svg, but with specific bits under the "sodipodi" namespace IIRC.

Edit: also note that svg can have resolution-dependent details : see last discussion on hn https://news.ycombinator.com/item?id=22374744


As mentioned elsewhere in this thread, Haiku solves the detail issue by allowing shapes/paths etc to be marked to only render in certain resolution ranges.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: