Since I missed mentioning this to some people in Jabber, I'm following
up here.
We've been looking a little at how to get multiple versions of a single
graphic into one SVG so that we can do changes depending on rendered
resolution. I'd looked into using the <switch> element, but that
really has no access to what we need. There might be some advanced CSS
tricks to pull it off, but even those are probably too tricky to be
widely working.
:-(
However, the good news is that SVG 1.2 added exactly this feature
12.3 Alternate content based on display resolutions
http://www.w3.org/TR/SVG12/media.html#multires
We'd block things out in a <multiImage> tag which could contain
zero or more <subImage> elements which in turn each contains a
separate <svg> tree. Or the <multiImage> could also contain
zero or more <subImageRef> elements, which could have embedded
bitmaps as a "data:" href. Each of the <subImage> and
<subImageRef> tags can have min-pixel-size and/or max-pixel-size
attributes.
For the big-picture, all we need to do is support this and get the
librsvg guys to also support it. They're not supporting 1.2 yet, but I
*really* think they should at least support this feature. Anyone
friendly with them should bring this up, and we might also want to look
at patches for them.
And on our side, I think we should get this on the roadmap and see if
we can attack it around the same time we implement <switch>.
Although the choice details are different, many of the abstract
concepts in play are the same.
Another *big* issue for us is going to be getting a nice UI. In
practice what would be a good way to present this functionality to the
user? Even if we don't get both implemented at the same time, the UI
for one should definitely take into account the other.
So the action items here would be
* Work with the librsvg maintainers.
* Implement <multiImage> (for our internal icons if nothing else)
* Develop a very nice UI