GNOME Bugzilla – Bug 104917
Nautilus needs to impose SVG sizes
Last modified: 2004-12-22 21:47:04 UTC
SVG icons have a size setting inside them which tend to be larger than what we want, for instance the svg-icons.sf.net icons use 128x128 and the Crystal SVG theme use 144x144. Nautilus should impose a size on the SVG icons relative to the screen resolution used. Would be really great if that was fixed for 2.2 as it would make porting SVG themes so much easer. Screenshot showing issue at hand: http://www.linuxrising.com/files/sphereandcrystal.png
You need to design your icons so that they are targeted for the size the index.theme file says. If it lists the directory with the svgs as Size=48 the svgs better render near 48 pixels. (Or you could change the index.theme file). This is intentional so that you can have control over how the size is handled instead of everything rendering at exactly the same size.
As you can see my index.theme file says 'Size=48', yet the SVG i still rendered at 144x144 as defined inside the .svg. [scalable/filesystems] MinSize=1 Size=48 MaxSize=128 Context=FileSystems Type=Scalable
Created attachment 14149 [details] folder icon that shows the issue
If you put the attached icon into for instance Scalable Gorilla or my Spheres-and-Crystals theme to replace the standard folder icon you will see the issue. This icon has the size 144x144 set in the SVG code and that is the size used, not the size from the index.theme file.
I tried setting the maxsize to 48 to test on dom's request and it made no difference. We also tried running it using display-test in librsvg using height and width parameters and that worked, so this is definetly not a librsvg issue.
Changing keyword to 2.3 (hopeing that Alex or Dave will be able to look into this at some point :)
NB: I haven't read the theme spec in a while, so my comments may be "out of spec" and might apply more to what I percieve as a flaw in the spec and not your implementation. What is the point of allowing (even recommending) using scalable icons and having vars like 'Size' and 'MaxSize' if they're not going to be used? It intutively seems to me that given these variables, an implementation would render an icon at a size somewhere between 48x48 and 128x128 regardless of the icon's natural size.
You misunderstand. As I said above: The "Size" field gives the size the icons are designed for, and if a icon size of that size is requested the svg will be rendered in its "natural" size. If an icon size of half that is requested it will be scaled by 0.5. Since your example svg is 144pt x 144pt, or 180x180 pixels with the default DPI this means that if you put Size=180 it will show up as you want. (Or you could change the size of the SVG.) This is just like placing a 180x180 png in the 48x48/ subdir. It will not be scaled, because it is assumed that the icons in that dir are designed to look good at a nominal icon size of 48x48.
ok, closing this bug then :)