I really miss Macromedia Flash. There wasn't a single tech like Flash and SWF format which flourished with so many indie games and animated movies available without any extra downloads (other than Flash Player). Barier to entry was so low. Now, take SVG, it has potential to do everything what SWF could. But there is no editor like Flash and scene/object based coding solution like ActionScript. And each browser has ow…
Nice things with SVG
81–90 of 112 posts
Re: Nice things with SVG
#82One fun thing that can be done with SVG files: you can use entities in an inline DTD to define constants to be shared across different places in the file. You can see some great examples of this in the SVGs in David Ellsworth's "Squares in Squares" page [0]. The major browsers have no issues with this, though note that some tools like Inkscape won't parse the DTD nor expand the entities. [0] https://kingbird.myphotos…
You say "entities" but that term is actually the name for SGML/XML's mechanism to define arbitrary syntactic content for reference/reuse with entity references a la &ref, whereas in SVG you can park shapes/paths/whatever under refs, giving those an id attribute value, and then those element in the body SVG content, which is also what the page you linked is using (for each individual SVG ie. there's no sharing of rect…
If I recall correctly, the primary motivation behind and was interoperability with corresponding primitives in Adobe Illustrator.
Re: Nice things with SVG
#83Earlier quoted context omitted.
so how can you know it's actually possible?
Browsers will render SVG files. SVG files can link to other SVG files. Just need to configure the server to serve SVG by default — most servers don't but it's an easy config change.
Re: Nice things with SVG
#84Earlier quoted context omitted.
It's a fun format that's easy to generate, but after trying to do complicated things with it.. you kind of understand why. It's underused b/c - Complex graphics render different in different browsers. So you can't rely on it shows up the same (never had the same issue with a PDF for example) - There are quite a few renderers but they typically don't implement large parts of SVG b/c it's too complex.. So you can never…
> There is basically one editor.. Inkscape. Do you mean in terms of open source vector editors? As there a wide variety of tools with SVG authoring/editing capability, among the most well-known being Adobe Illustrator, Sketch, Affinity Photo/Designer, even some web apps are available that were made for online SVG editing (eg: SVGator). Inkscape, like some tools such as Affinity's, adds its own XML namespace with cust…
SVGator is focused primarily on animation and it's rather pricey. Boxy SVG might be a better choice if you are looking for a web-based SVG editor (disclaimer: I'm the developer).
Re: Nice things with SVG
#85Earlier quoted context omitted.
I think GP is suggesting that the idea the GGP encountered an SVG that bricked their iPhone (without being a specifically crafted exploit payload) is an extraordinary claim that would require extraordinary evidence.
Also easy to interpret generously as hyperbole. Especially if you know how easy it can be to accidentally do something that works fine in other browsers but makes Safari kill the tab. Doesn't actually brick the device but a fairly hard failure in the browser.
Re: Nice things with SVG
#86Earlier quoted context omitted.
Which book are you referring to?
Probably “SVG Animations” available through O’Reilly. It is from 2017. While many of the frameworks used have come and gone; there are a few stable concepts. If you can get it on sale, I’d recommend. Full price is a hard sell.
Re: Nice things with SVG
#87That said, most of this is probably better done with CSS today.
My only professional exposure to SVG was when a pen tester found my predecessor's code had unintentionally allowed them, and that one can do injection attacks from the SVG itself. Of course this was around the time a client discovered SVG worked for them, so I had to make support official and defeat injection attacks. Good times.
Re: Nice things with SVG
#88One fun thing that can be done with SVG files: you can use entities in an inline DTD to define constants to be shared across different places in the file. You can see some great examples of this in the SVGs in David Ellsworth's "Squares in Squares" page [0]. The major browsers have no issues with this, though note that some tools like Inkscape won't parse the DTD nor expand the entities. [0] https://kingbird.myphotos…
Maybe I am missing something, but can't find any !doctype or !element that would represent a DTD on that page. If you are talking simply about SVG defs and use - that isn't a DTD.
Re: Nice things with SVG
#89One fun thing that can be done with SVG files: you can use entities in an inline DTD to define constants to be shared across different places in the file. You can see some great examples of this in the SVGs in David Ellsworth's "Squares in Squares" page [0]. The major browsers have no issues with this, though note that some tools like Inkscape won't parse the DTD nor expand the entities. [0] https://kingbird.myphotos…
You say "entities" but that term is actually the name for SGML/XML's mechanism to define arbitrary syntactic content for reference/reuse with entity references a la &ref, whereas in SVG you can park shapes/paths/whatever under refs, giving those an id attribute value, and then those element in the body SVG content, which is also what the page you linked is using (for each individual SVG ie. there's no sharing of rect…
To be clear, it's using both of them for different purposes, you'll find both elements and declarations in files like https://kingbird.myphotos.cc/packing/square-11.svg. You can't a numeric quantity in an attribute, the closest alternative for those would be CSS variables.
As for the existence of , I agree with jarek-foksa, the idea is that the original element and all its clones from are linked in the DOM at runtime, as opposed to DTD entities which are baked in textually. Also, most people hate XML, I'd imagine they'd hate internal DTDs doubly so, especially with how little information can be found about them outside the XML standard.
(Browser devs also love to beat the drum of minimizing attack surface, so it's a bit surprising that DTDs and XML stylesheets still work at all. I'd expect them to tear out that functionality in a heartbeat if it were ever used in a modern exploit.)
Re: Nice things with SVG
#90Earlier quoted context omitted.
Any examples? This sounds interesting to me.
Preview: https://grok.com/share/bGVnYWN5_2a2dd030-8177-4fa0-aac5-17d2...