4

I've been looking for a while for the best conventions for icons, but I just find lots of inconsistent web pages. Maybe the conventions have changed and they need updating, or maybe I just haven't been able to find the right page.

  1. It seems like both PNG and SVG icons are supported. Are SVG icons preferred? Are there any downsides (because many packages don't use them)?
  2. If I use an SVG icon, can I have a separate PNG one for 16x16? Our icon will not resize down to 16x16 very well.
  3. If I use PNG icons, what sizes should I provide?
  4. What should the icons be named?
  5. Where should they be placed? /usr/share/icons? /usr/share/pixmaps?
5

I would think that SVG is preferred, because they are scalable to any size. This should also answer your second question.

For other formats, there are a variety of sizes. I got the following counts from my Ubuntu installation. Based on this, I'm guessing you should include 8, 16, 22, 24, 32, 48, and 256.

17M     /usr/share/icons/gnome/scalable
628K    /usr/share/icons/gnome/512x512
8.5M    /usr/share/icons/gnome/256x256
208K    /usr/share/icons/gnome/128x128
20K     /usr/share/icons/gnome/64x64
2.0M    /usr/share/icons/gnome/48x48
2.1M    /usr/share/icons/gnome/32x32
1.9M    /usr/share/icons/gnome/24x24
1.9M    /usr/share/icons/gnome/22x22
2.1M    /usr/share/icons/gnome/16x16
32K     /usr/share/icons/gnome/8x8

I also found a question on Ask Ubuntu, where they say they like to see 16, 32, 64, and 128.

And a question on StackOverflow where they say 48 is a good size, and has some information about how to include these.

Edit: The Freedesktop.org guidelines are here, which discusses terminology, directories, and how the icons are looked up.

  • Thanks! This was very helpful. So comments: Our icon won't scale well, which is why I'd like a separate 16x16 icon. The answer on SO suggest using both an SVG and a PNG... so I could I could do that for the 16x16, it would override the SVG right? – curiousdannii Mar 24 '14 at 3:16
  • But here is one inconsistency (which is the sort of thing I was complaining about): should it be in /usr/share/icons/ or /usr/local/share/icons/? Should the theme be gnome or hicolor? – curiousdannii Mar 24 '14 at 3:17
  • 1
    I'm not sure how it chooses between SVG and PNG... I would say if your icon doesn't scale well, skip the SVG and make your PNG icons look good at the right sizes. I don't have a /usr/local/share/icons on Ubuntu. I found an explanation for hicolor here, basically it is the fallback for the current theme or "gnome". – fooot Mar 24 '14 at 3:36
  • What about the /usr/share/pixmaps folder? I notice a lot of apps use it rather than /usr/share/icons. – curiousdannii Mar 24 '14 at 4:32
  • 1
    @curiousdannii the /usr/local tree is for locally-installed packages only, ie, those an admin compile and install manually with make install. If you're building a .deb package, the proper destination is /usr/share/icons – MestreLion Jul 27 '14 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.