3 ms·
> SVG is such an under-appreciated graphics format. SVG is an over-romanticised format. Support for logic makes it a major XSS vector, XML makes it inefficien
by masklinn 3y ago
> SVG is such an under-appreciated graphics format.
SVG is an over-romanticised format.
Support for logic makes it a major XSS vector, XML makes it inefficient, and the path langage makes it unreadable.
- asimpletune 3y agoAnd yet compared to the alternatives its advantages outweigh these flaws.
- nologic01 3y ago> the path langage makes it unreadable. at least this part seems over-the top criticism :-) Anything that can capture free-form graphical information will be unreadable. You could represent paths with points but that would make it more inefficient. The thing to keep in mind too is that because it fell out of favor the standard has not really evolved.
- masklinn 3y ago> at least this part seems over-the top criticism :-) Individually the XML and the path format are “fine”, the problem is that they’re both in the same file format. > Anything that can capture free-form graphical information will be unreadable. It’s not the question of being freeform, it’s the weird-ass single-letter command names in an attribute string. In an XML document which is otherwise self-descripting.
- dingledork69 3y ago[flagged]
- h0l0cube 3y ago> It’s not the question of being freeform, it’s the weird-ass single-letter command names in an attribute string. > In an XML document which is otherwise self-descripting. This is an odd plaint. M/m is for move, L/l is for line-to, C/c is for curve-to, V/v and H/h are for vertical and horizontal lines respectively, and svgo might throw some 's' curves in there. It's the best of both worlds, giving excellent compression while remaining human readable enough for a novice to manipulate geometry by just messing about.
- classified 3y agoSo what do you want? If it's readable, you call it inefficient, and if it's efficient, you call it unreadable. Make up your mind.
- masklinn 3y agoI don’t need to “make up my mind”, because the entire point is that SVG has all disadvantages thus having none of the advantages. It could be readable or efficient, and either would be fine, but it’s neither.
- jbaber 3y agoI love svg solely because it's an open vector format, not because it allows javascript, is xml, etc. Any plaintext vector format would be equally nice.
- jmisavage 3y agoAny language where you don’t know the syntax looks weird at first. There are 6 types of commands with 20 commands in total. Half of those use document based coordinate system and the other half are relative to the previous command.
- th0ma5 3y agoThe path language is somewhat a standard (lol) but is very similar to HPGL, glyph definitions in fonts, GCode, or even Logo and reading it is not a requirement.