Hacker News new | past | comments | ask | show | jobs | submit login

Retina displays are removing the need to worry about this. When pixels are invisible, hinting problems are invisible too.



They don't, hinting is also about removing details which you can't do in SVG.

When people provide icons in many physical sizes, the icons generally aren't mere scaling up and down, because even if you can hint so the lines themselves don't blur the details will get so small the whole icon becomes a mess. Apple even has a note on this in their HIG:

> If an icon’s content or shape is overly complex, the details can become confusing and may appear blurry at smaller sizes.

note that this is not about logical size and retina displays, it's about physical size and the viewer's eye's power of resolution.


Well, you also can't do that in PNG format.


Plus, couldn't you have multiple layers of SVG, and have the javascript respond by hiding/showing detail layers? SVG is more javascript-friendly than PNG so there's opportunity to have one SVG that gets tweaked by your js instead of multiple raster files.


SVG is more javascript-friendly than PNG

That sounds more like a problem than a solution to me.


Correct. But PNG works and is widely deployed today. Considering SVG fails at one of the primary use cases where it could have an edge over PNG, it's no surprise few care for it.


You can create an SVG where certain elements are hidden when rendered below a particular size using embedded JavaScript. It would be a pain in the ass because it would have to be done by hand, but you could do it. It's a problem with the tools we use to create SVGs, not the capabilities of the format.


Hmm, could it be done via CSS?


Now that you mention it, you can do it with CSS media queries, like so (but with shape and path elements rather than image elements):

https://github.com/estelle/clowncar


This could be done programatically. Most vector map software manages it, SVG should adopt it.


Great, so now we've got an image format which does not work by default.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: