4 ms·
SVG was a mistake, but we're stuck with it. Does SVG offer any advantages over, say, EMF/WMF? I know a strong advantage of WMF is that the file format translat
by DaiPlusPlus 9y ago
SVG was a mistake, but we're stuck with it.
Does SVG offer any advantages over, say, EMF/WMF? I know a strong advantage of WMF is that the file format translates 1:1 into GDI calls, which makes it very fast - but I don't see EMF files rendered with anti-aliasing or complex gradients. What about PDF or PostScript?
- porfirium 9y ago>I know a strong advantage of WMF is that the file format translates 1:1 into GDI calls S... strong advantage?
- DaiPlusPlus 9y agoSimplicity of implementation. GDI's drawing primitives exist in practically all other drawing APIs so translating it to Cairo, OpenGL, or Direct2D should be trivial.
- chris_wot 9y agoHardly. You are coupling the Windows GDI to an image format. It’s horrible to parse, and reliant on Windows quirks. It’s really not that great.
- Samis2001 9y agoIf you're talking standards, then platform-specific advantages mean precisely nothing.
- vesinisa 9y agoSVG would actually be great if it wasn't such a feature creep. Filters, masks, scripts and animations are supported only by some renderers, often inconsistenly. This does not seem to stop SVG generators producing documents using these features, often unnecessarily. Good SVG can even be human-readable and -editable. I've actually fixed simple broken SVGs with vim and a pocket calculator. PostScript is great but as a binary format not very modern, where text-based formats seem preferred. I had to look up WMF and dumping calls to Microsoft API as an 'open' standards does not sound too exciting, either.
- fanf2 9y agoPostscript is a text format :-) Its disadvantage is that it is a full on programming language, not declarative, so it isn't friendly to editing tools.
- vesinisa 9y agoYou are right on both counts! I seem to have mixed it with PDF. Sadly, programming is coming to SVG as well with more and more renderers supporting JavaScript. Which might be great for some use cases, but again even further disperses the field of possible generator/feature/renderer combinations that might (will) fail.
- int_19h 9y agoEMF+ has GDI+ primitives in it, which do allow for anti-aliasing and gradients.
- chris_wot 9y agoOh dear god no. Trying to parse EMF+ is a bit of a nightmare, and it’s not just 1:1 GDI calls, there are dual EMF/EMF+ files, it’s stack based (I suppose not so bad), with klydge after kludge (especially around text)... we use it because we have to.