This showcases what's wrong with SVG: It does way too much! To be useful as a vector image format, there should be strict rules (and less cruft). Why is there no libsvg like libjpeg or libpng? Why have interaction as part of an image format? SVG lives in an uncanny valley between jpeg and flash/js. I think there is still a big need for a real vector interchange and display format. Right now people pick a "good" subse…
> It does way too much! And even so, it still has no hairline. All line widths are finite and change when zooming.
SVG can do that?
141–150 of 202 posts
Re: SVG can do that?
#142Re: SVG can do that?
#143This showcases what's wrong with SVG: It does way too much! To be useful as a vector image format, there should be strict rules (and less cruft). Why is there no libsvg like libjpeg or libpng? Why have interaction as part of an image format? SVG lives in an uncanny valley between jpeg and flash/js. I think there is still a big need for a real vector interchange and display format. Right now people pick a "good" subse…
and that ignoring browser specific issues, for example svg and css filtering don't work on edge/ie11
but nice hacks I guess. the real takeaway are probably svg animations, those can make cool stuff without the keyframe weirdness.
Re: SVG can do that?
#144This showcases what's wrong with SVG: It does way too much! To be useful as a vector image format, there should be strict rules (and less cruft). Why is there no libsvg like libjpeg or libpng? Why have interaction as part of an image format? SVG lives in an uncanny valley between jpeg and flash/js. I think there is still a big need for a real vector interchange and display format. Right now people pick a "good" subse…
> It does way too much! And even so, it still has no hairline. All line widths are finite and change when zooming.
It's implemented as vector-effect: vector-effect="non-scaling-stroke"
There's an example here https://gist.github.com/lightjs/5372867
Re: SVG can do that?
#145Re: SVG can do that?
#146Earlier quoted context omitted.
This! I've started to look for usable vector image format for game development somewhere in 2004, now it's 2017 and there is still nothing available. For SVG you literally need to pull-in whole browser engine, which is most likely 2-3 times the size of your whole game.
One possible solution is to the same what XMPP did on XML, or JSON did on JavaScript: Define a "safe subset" of SVG, and stick to that. Perhaps use the "safe subset of XML" as a base (as defined e.g. in XMPP.) Use a library (or at least a validator) that works exactly on this subset, and fails for anything not strictly conforming to this. Of course, this is not as satisfying as a "clean slate" approach, but on the ot…
https://github.com/GNOME/librsvg
However, admittedly, I use it in combination with a full blown browser because it doesn't need/handle text completely. I like SVG, but I too have accepted that if I want stuff to render properly, the only place to find a usable and complete SVG engine is in a web browser.
Re: SVG can do that?
#147I use svg all the time to make tiny web interfaces for embedded systems. When the entire web app has to fit in 350k, you don't have space for gif's or jpg's.
Re: SVG can do that?
#148Re: SVG can do that?
#149Earlier quoted context omitted.
But GP's point is the opposite, that HTML/CSS/JS is being used too often for tasks that could be much more simply solved by SVG. I can think of a couple just in my current project.
Cool, could you please explain what are they? To me, personally, SVG is the last resort.
Re: SVG can do that?
#150We attempted to do a complex animation in SVG and the primary complaint was that it killed the browser in terms of CPU and memory usage. Are we doing something wrong?