Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

3.3 Icon Cache

3.3.1 Introduction

In order to display icons in software-centers, distributors should offer a repository of cached icons for applications defined in their AppStream XML files. The icons should be PNG files or vectorgraphics (PNG is preferred) and match the name referenced in the applications .desktop file. Their size should be 64x64px, it is okay to just provide one size.

3.3.2 Filesystem locations

All icons of type cached must be placed in /usr/share/swcatalog/icons/%{origin}/%{size}/ or /var/(lib|cache)/swcatalog/icons/%{origin}/%{size}/, where origin is the AppStream data origin defined in the AppStream data file (see Section 3.1.3, “General XML structure”), and size is 64x64 or 128x128 depending on the size of the icon. And icon might be present with different sizes in both directories. When finding cached icons, they must only be searched for in the same location where the accompanying catalog metadata is located. For example, icons for /var/lib/swcatalog/xml/debian-jessie-main.xml.gz must only be looked up in /var/lib/swcatalog/icons/debian-jessie-main/ and not also in locations in /var/cache/ or elsewhere.

For example the cache icon krita.png of a component in a data file with the origin jessie should be stored in /usr/share/swcatalog/icons/jessie/64x64/krita.png (or in the /var/cache location).

Icon scaling factors commonly used for HiDPI display support are part of the size-directory filename and are separated from the regular size via an @ sign. If the scaling factor is 1, it must be omitted from the directory name. For example, if the icon scaling factor is 2 for icons of size 64x64 from origin jessie, the icon must be placed in /usr/share/swcatalog/icons/jessie/64x64@2/.

Note
Note: Legacy Support

In order to support the old icon cache layout, client applications may also look for icons in the folder below the size-directories, assuming that the icons placed there are of size 64x64 pixels.