Re: [w3c/manifest] Example suggests that `icons` `sizes` mean a minimum size, but normative text doesn't support that (#925)

> "Appropriateness" is perhaps a little bit subjective, but yes I do wonder whether sorting by size might help.

Sorry @benfrancis I was being facetious, making a joke on the normative use of the word "appropriate" [in the spec](https://www.w3.org/TR/appmanifest/#icons-member) without any definition of what "appropriate" means.

As of right now, I consider the correct order to choose icons to be user-agent-defined. Maybe we'll keep it that way, but then we should remove this paragraph and just state that it's user-agent-defined. Otherwise, we should be much clearer about the order, either by rewriting this paragraph, or by actually defining "appropriateness" as a [total order](https://en.wikipedia.org/wiki/Total_order).

> what to do about icons which have different width and height dimensions

I'm not sure where this is used in Chrome these days, but a long long time ago, I wrote this algorithm in Chrome for choosing the best out of a set of arbitrarily-shaped rectangular icons: [GetBest](https://source.chromium.org/chromium/chromium/src/+/master:ui/gfx/image/image_family.cc;drc=977a73777133c13d83cd5d6179497534db0a98b3;l=54?originalUrl=https:%2F%2Fcs.chromium.org%2F). How it seems to work is that it first sorts all the icons by _aspect ratio_, and chooses the one with the closest aspect ratio to the desired size (which I suppose in most cases will be simply the closest icon to square). Then it breaks ties based on the closest width (or height; doesn't matter since we know they all have the same aspect ratio). This means if you have any square icons, all other icons will always be ignored, no matter their size.

In practice, thinking about this isn't very important because almost every icon ever created is square, and we can just say, if it's not square, meh (we shouldn't *crash* but we also don't need to worry particularly about choosing the right icon).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/925#issuecomment-665454327

Received on Wednesday, 29 July 2020 06:12:58 UTC