Hacker News new | ask | show | jobs
by gulpahum 3597 days ago
What would be the purpose of such a simpler vector format?

Several formats already exist for various use cases: PDF for printing, SVG for web graphics (simple content and icons), OpenType fonts for vector based text and SVG as an exchange format between vector graphics apps.

The only use case I can think of is for standalone vector graphics images, but PDF or SVG is often good enough for that.

3 comments

The thing is, almost nobody is using SVGs on the Web. Usually wikipedia is cited as a website that uses them, when in reality they're rendering them to raster images. They actually have a nice site with the problems they're facing: https://commons.wikimedia.org/wiki/Help:SVG#Creating_SVG_ima... Other issues are that files might be bigger than pngs and have bad performance.

PNG and JPEG files are also universally usable outside of browsers. Linux systems often use SVGs for icons, but that's basically where the support stops. If I want to include a SVG in a latex I have to convert it to postscript or pdf. If I want to include a SVG into a Word document I have to convert it into an emf (enhanced metafile). You can't use SVGs for cocoa, UIkit, WinForms or MFC applications out of the box. The reason probably is the complexity to support SVGs.

I use SVG graphics almost exclusively nowadays. Browser support is near-universal. Being able to use the same graphics asset in a wide variety of sizes and screen resolutions is immensely convenient. Rather than having numerous copies of a logo (small, large, retina etc) I only have to make one SVG version (and one PNG fall-back if IE8 matters).

Want the logo a bit smaller? Want that little design element bigger? It's incredibly convenient knowing you can change up your design a bit without having to regenerate your graphics.

"The thing is, almost nobody is using SVGs on the Web."

I disagree.

I regularly visit codrops and they show a lot of cases how you can use them. A lot of the frontend web development is using them a lot.

http://www.ns.nl/ the dutch train company, for example uses a mix of inline svg, background image svg and scr tags with svgs.

https://www.spotify.com/nl/ uses SVG in the logo, the account icon and the arrows.

https://www.digitalocean.com/ svg is best practise for having vector images on your site.

The nice thing of SVG is the compatibility with css, for the web it is a nice tool to use.

Of course there are counterexamples but most websites aren't using SVG. Out of the Alexa top 20 only live.com is using svgs everywhere where they make sense and only yahoo.com is using them in some parts of the website.
I have gone in deep with SVG, rendering them inline with backend code that embeds locale specific text and hyperlinks. I am a big fan of 'use' and sprite-sheets. SVG everywhere is what I like, in fact I prefer to embed a PNG in SVG rather than using native images.

I also prefer to work in SVG directly, i.e. not with some export from an Adobe product. Inkscape is helpful at times but normally it is much easier to do one's own primitives than to have some path that does a circle in however many points. It is great when you can do something like an Instagram icon in four lines of SVG (including colour gradients) than the 1.4Mb EPS file provided in their brand resources.

I do scour the web for things in SVG that are to my personal standards of doing it, i.e. cruft free with a sensible viewbox etc. Yet rarely do I find anything that is that good. It is like the difference between HTML and MS Word documents exported to HTML, with proprietary tags etc.

I do not work too well with the graphics team I work with when it comes to SVG - they are still in the print era and not on the same page as me. They are no more able to work with SVG than the Office Manager is able to make the leap from MS Word to editing HTML in 'vi'.

Regarding usability, for 'supported browsers' (no IE 9-) SVG is great. A year ago I would not have thought that.

For us programmer types SVG is accessible, for graphics guys it isn't really. This I like as I can work with my frontend developer on SVG and not really need 'assets' from the graphics guys still stuck with GUI desktop publishing software that should have been left in the 90's where it belongs.

Hey I like SVG too, even doing logos by hand with it. To this purpose I've created this: http://www.gamesfrommars.fr/live-svg-editor/ I have trouble making SVG use each other reliably though.
> The thing is, almost nobody is using SVGs on the Web.

Google maps switched to SVG for street layers like ten years ago.

> PNG and JPEG files are also universally usable outside of browsers.

JPEG files were the standard for photographs before the first browser was written.

PNGs are super easy to support if you don't care about gamma correction, so it's no surprise that they're widely used.

Vector formats are another beast altogether. Notice from your example that you can't include the EMF in latex either, since an EMF is basically a set of windows draw commands. I'm not sure about the current status of Postscript in Word. Years ago you could embed EPS files but they wouldn't display and only print if you had a postscript printer.

Vector formats are just difficult.

Pretty much the great data viz graphs produced by D3.js are built on SVG - https://d3js.org/
They are recommended quite often for icons now (but I don't have numbers on SVG vs icon-fonts)
My own intuition is that what is wanted here is a vector-graphics Abstract Machine instruction set in the RISC style, where an implementer only has to write and optimize code for a set of orthogonal primitives, and then everything else "falls out" of that.

Such a vector-drawing ISA wouldn't be at all human-readable, but it'd be an excellent object-code format for other vector formats to compile down to.

> What would be the purpose of such a simpler vector format?

To allow simpler implementation for both consumer and creator software. To achieve better performance (lower size, faster parsing and drawing).

> The only use case I can think of is for standalone vector graphics images, but PDF or SVG is often good enough for that.

SVG has some problems as a graphics format, which are highlighted in this thread. I'm not sure about PDF, I never saw it used as a vector image format, so can't judge much about it.

PDF's graphics are an optionally-compressed-binarily subset of PostScript, which manages to be both human-readable and relatively simple to parse.