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

Not entirely true. A lot of times resolutions are just double the normal one, so the SVG image scales perfectly and looks good.



I have written my prev reply before I've seen yours.

Yes, if its mostly double-sized resolution then blurring shouldnt be a prob,

And when it is some strange "1.something" or "2.something" resolution, then probably also PNGs will look blurred, unles you dont supply exact special PNGs for such resolutions


Assuming it was hinted to the intended resolution. But that's still an extra step.


For 1px lines the only thing you have to remember is to put the points on half-pixels (annoying, but you can just wrap a <g transform='translate(0.5 0.5)> around your drawing if needed. The other thing would be shape-rendering='crispEdges' which also helps, but not everywhere.


Which you can't have in SVG since the format (IIRC) does not support any hinting. So it's down to luck, and the width of your lines.


Well, SVG's default coordinate space is defined in terms of CSS pixels, which explicitly allow for rounding to match (a multiple of) the device pixel size. So, if you align things to SVG pixels, they'll likely come out rounded to device pixels.


I've never had a problem with hinting, why does everybody consider it so difficult?




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

Search: