We have solved this problem with fonts, but it is extremely complex, both for the artist and for the rendering code.
We have solved this problem with fonts, but it is extremely complex, both for the artist and for the rendering code.
You can no longer expect bitmap pixels to map to device pixels in any reasonable way. (Heck, just turn your desktop browser zoom to 90% or 110%.)
There was a time for hinting, but it's long gone.
So the only size increase really comes from the edges. In practice, this means that an 8x size increase will often only increase the file size by around 10x.
The SVGs in question were 6kB and 568kB in size, respectively.
At 25% size (around 256x256px) the PNGs were 13kB and 30kB respectively.
At 100% size (around 1024x1024px) they were 60kB and 266kB respectively.
I scaled the complex image to 200% (2048x2048) just out of curiosity, and it became 841kB, roughly 28x the size of the smallest, which uses 1/64 as many pixels. It is interesting that the complex image seems to approach size growing with area at the high end of resolution. Of course, this is a sample of 2.
If we start seeing 4K screens, worrying about those blurry anti-aliasing lines is going to seem absurd.
Use your phone to contrast AA to non-AA. The difference is still pretty enormous in my opinion.
I wonder though - would it be possible to apply hinting to svg with javascript?
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.
That sounds more like a problem than a solution to me.
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
But is hinting even possible in a format that supports multiple colors? It does not seem obvious to me that it is.
For me, that would be one of the main reasons against SVG