4 ms·
SVG is definitely human-readable. It's just drawing instructions, draw a line from there to there, then another one from there to there, etc. I can read it to s
by Valgrim 6y ago
SVG is definitely human-readable. It's just drawing instructions, draw a line from there to there, then another one from there to there, etc. I can read it to someone over the phone with a pen and graph paper, and he can draw it exactly like it should be represented, with zero loss of quality. It's no different than someone looking at list of cash transactions. Numbers are text too.
Of course, to extract meaning from this text (what is it?) requires drawing it. But you don't have to, you can just name it. You could just say "I'm sending you the stylised image of a blue bird, with the instructions on how to draw it using the SVG text standard". Or just, more clearly even, the following string of characters: "twitter_logo.svg"
- danShumway 6y ago> SVG is definitely human-readable. No. A path tag with a 500-600 element `d` attribute is not human readable. It is not human understandable or parsable until it's converted into a visual format. Ask a blind person whether they think SVG charts are accessible on their own without any additional markup or alternate explanations or controls. Ask them if they can read SVG line charts by stepping through the path property. Figuring out how to communicate complicated graphs/charts with lots of data without relying on any visual medium is a complicated problem that we are still trying to solve. > You could just say "I'm sending you the stylised image of a blue bird, with the instructions on how to draw it using the SVG text standard". Or just, more clearly even, the following string of characters: "twitter_logo.svg" By that logic, a PNG is also text, because I can do the same thing. All images can have alt tags. Even Javascript Canvas can have fallback text for when it doesn't render. My Twitter png can be transmitted as "twitter_logo.png". What do people mean when they say text is preferable if not that the textual representation is more useful than the image representation? If you didn't feel like the SVG format was adding any useful information in its rendered form, you wouldn't waste the time sending information to render it. You would just send the alt text. > I can read it to someone over the phone with a pen and graph paper, and he can draw it exactly like it should be represented, with zero loss of quality Right, and when that person draws it, they will have converted it from a textual format into a visual one. I can send you the individual pixels of a small raster image over the wire in a textual format and you can sit down on a piece of grid paper and ink in squares until you come up with the final image. At which point you will no longer be looking at a piece of text. To argue that the fact that we can encode a format over a UTF-8 stream or physically replicate your computer's drawing algorithm makes a thing text seems to me to be a misreading of the original article's point. The original article is not complimentary of Twitter's SVG, it explicitly brings it up as an example of a non-text medium. If you expand the definition of text to include basically any storeable information that can be theoretically encoded into UTF-8, then sure, I would agree that text in that system is tremendously powerful. But that's not a useful category to talk about, it's so broad that it becomes meaningless.
- dkersten 6y ago> It's just drawing instructions, draw a line from there to there That doesn't make it human-readable. I challenge you to tell me what (even the basic shape) this SVG is without loading it in a viewer (taken from a real SVG, not something handcrafted to prove you wrong, but the first thing I found online while searching for public domain SVG files): https://gist.github.com/danielytics/90446a2314c1ad87017233eb400b7df9 https://gist.github.com/danielytics/90446a2314c1ad87017233eb... Good luck figuring out what that is, even with graph paper. And that's a single layer, single (even if a bit complex) shape, single colour SVG. They only get more incomprehensible from here.