News for hackers. Stuff that matters.
Re:Always Bet on Text (2014) by dmingod666 on Wednesday February 17, 2021 @07:56AM (#26165792)
well, svg is text. The jpg/png icon will pixelate when zoomed, but svg will retain its quality no matter how much you zoom in... :)
Re:Always Bet on Text (2014) by dkersten on Wednesday February 17, 2021 @08:12AM (#26165911)
> svg is text.

If SVG counts as text, then text is just binary. The encoding is not important, the final result (an image you see on a screen, in the case of SVG) is.

Besides, try reading out the actual SVG source text to someone and see if they can tell you what the image you are describing is. I dunno about you, but I find thinking in terms of paths and strokes to be rather meaningless.

Or another example, do you consider Wavefront .obj files text? They're ascii files, but I don't consider a series of "v 0.123 0.234 0.345 1.0" as something I would ever read in text form and have even the slightest idea of what the final 3D model actually is. I have to view it visually. Its "technically" text, but its no more useful as text (for a human text reader) than if it were binary data. Encoding isn't what makes text what it is, so non-text things encoded as text aren't really text.

Re:Always Bet on Text (2014) by Valgrim on Wednesday February 17, 2021 @08:46AM (#26166192)
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"

Re:Always Bet on Text (2014) by danShumway on Wednesday February 17, 2021 @10:56AM (#26167794)
> 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.

Re:Always Bet on Text (2014) by dkersten on Thursday February 18, 2021 @09:25AM (#26180095)
> 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/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.

Re:Always Bet on Text (2014) by dmingod666 on Wednesday February 17, 2021 @08:55AM (#26166269)
Is math that you not understand, really text?

Is human comprehensibility a pre-requisive to be called text? What if there was a written language no one understood, would that be text? What if someone broke the code for it? Would it suddenly become text?

Re:Always Bet on Text (2014) by criddell on Wednesday February 17, 2021 @08:44AM (#26166175)
If SVG is text, then so is StarWars.mpg.b64.
Re:Always Bet on Text (2014) by wvenable on Wednesday February 17, 2021 @12:01PM (#26168594)
Some SVG is very readable and easy to modify. I'm no designer but I've opened up SVG files and made modifications to get what I want (remove elements, change colors, etc).

Not all SVG authoring tools make SVG's easy to read/modify. Tools in the 90's used to the same thing with HTML. Are you going to argue HTML isn't text?

Re:Always Bet on Text (2014) by criddell on Wednesday February 17, 2021 @07:21PM (#26173774)
> Are you going to argue HTML isn't text?

Go to google.com and view source. That's text, right?

Re:Always Bet on Text (2014) by dmingod666 on Wednesday February 17, 2021 @08:03PM (#26174123)
Compression is part of human communication also. Sometimes it's used to keep the communication short, sometime to hide the meaning behind what is said.

lol, brb, PFA, W.H.O., IMHO, IANAL, GPA, GTA.. word soup for a different audience..

Re:Always Bet on Text (2014) by wvenable on Wednesday February 17, 2021 @08:29PM (#26174328)
So because google.com is hard to read, HTML is not text?
Re:Always Bet on Text (2014) by numlock86 on Wednesday February 17, 2021 @08:07AM (#26165867)
> svg is text

Actually I thought about talking about SVG, which would be the natural result of taking a text representation of shapes ... and then use abbreviations until you are at some expert level language (SVG for example), which would then break the argument again. You might as well use some binary representation then, because most people don't speak fluent SVG.

Re:Always Bet on Text (2014) by DarkWiiPlayer on Wednesday February 17, 2021 @10:29AM (#26167398)
Most people don't speak fluid tok pisin either; does that make it less of a language?

Also, you'd be surprised by the amount of people that write SVG by hand, which I doubt you'll see with PNG anytime soon.

Re:Always Bet on Text (2014) by fotad on Wednesday February 17, 2021 @08:07AM (#26165877)
Different SVG engines may show different result, that may not acceptable for logo.
Re:Always Bet on Text (2014) by mcherm on Wednesday February 17, 2021 @08:13AM (#26165917)
Can you elaborate?

Outside of bugs, I was under the impression that SVG was actually pretty well specified and that (except perhaps for pathological examples created intentionally) the rendering of an SVG was quite consistent.

What am I not aware of?