Hacker News new | ask | show | jobs
by astrieanna 3581 days ago
There is a feature of HVIF, called level of detail, that lets you vary what shapes appear according to the display size. You can find it in the Icon-o-Matic documentation. Ctrl-F for "LOD" in https://www.haiku-os.org/docs/userguide/en/applications/icon...
2 comments

So like media queries, in CSS? That's neat.
That's pretty cool!
Very interesting
That's good, although you also want to change the size of things—make the remaining details larger at smaller sizes, so they show more clearly. Cape Cod is really narrow, but for a small US map you still want it clearly defined :-)
I imagine you would support that by showing the larger shape while hiding the smaller one in the small icon, and showing the smaller shape while hiding the larger one in the large icon.
That kind of goes back to having one file per size, in terms of space. Although it's more flexible and might be easier to maintain.
Having one vector file per size would involve each file being close to constant size. Adding one resized shape only adds twenty-some bytes (a few headers/indexes, plus the transformation matrix); this is a lot less than a whole new file.