2

Lubuntu, a flavor of Ubuntu, ships with a few icon themes including elementary. Since many of the icons are .svg files, it's somewhat easy to make minor tweaks to suit one's visual preferences. While doing so, I noticed a feature common to several .svg icons which I don't understand. I hope to illustrate this feature with an small example:

elementary icons

In the image above, consider system-restart-panel.svg. I'm including its code after scouring for brevity:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg id="svg3211" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="12" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
 <defs id="defs3213">
  <linearGradient id="linearGradient2878" y2="5" gradientUnits="userSpaceOnUse" x2="15.5" gradientTransform="translate(-6,-4)" y1="19" x1="15.5">
   <stop id="stop4629-22-2" stop-color="#49a3d2" offset="0"/>
   <stop id="stop4631-4-9" stop-color="#3470b4" offset=".705"/>
   <stop id="stop4633-7-6" stop-color="#1b5699" offset="1"/>
  </linearGradient>
 </defs>
 <path id="path3224" opacity=".7" d="m6 2v2c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6h-2c0 2.2-1.79 4-4 4s-4-1.8-4-4c0-2.21 1.79-4 4-4v2l5-3-5-3z" fill-rule="evenodd" fill="#fff"/>
 <path id="path4199" d="m6 1v2c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6h-2c0 2.2-1.79 4-4 4s-4-1.8-4-4c0-2.21 1.79-4 4-4v2l5-3-5-3z" fill-rule="evenodd" fill="url(#linearGradient2878)"/>
</svg>

The common feature I referred to above is the presence of (in this case) path3224. This path has fill="#fff" and is slightly offset from the "real" visible path, path4199, which has a gradient of blues.

In short, my question is this: what is the purpose of this other path?

5
  • 4
    Next week: How to code a fashion magazine using postscript :)
    – TehMacDawg
    Jun 1, 2013 at 12:13
  • What does your comment mean? If you think my question is inappropriate, you have the rep to downvote it :)
    – user13098
    Jun 1, 2013 at 12:31
  • No, no, I was just alluding to an old joke about geeks in design (Postscript can be seen as a language for coding, too…)
    – TehMacDawg
    Jun 1, 2013 at 15:42
  • So what is it about my question that required allusion to an old joke? Maybe you (or I) can edit the question so that it doesn't merit comments of the sort you made.
    – user13098
    Jun 1, 2013 at 16:20
  • It's the notion of graphic design by manual coding. It's all in good humour, though. Sorry if it pissed you off.
    – TehMacDawg
    Jun 1, 2013 at 17:23

1 Answer 1

2

The second arrow in the icon file casts a light "shadow" with white having 70% opacity. This will not be seen when rendered on a white background but on a coloured or grey background it is useful to increase contrast and visibility:

enter image description here with shadow enter image description here no shadow

2
  • 2
    I had the same speculation. If this was intentional, it sure is weird. It doesn't look that great. It looks even worse on the other icons, take for example the WiFi icon. Close up you can see that it is a sloppy execution, but at small resolutions it just makes the icon look... bad. Perhaps this was a case of "this looks alright on this one icon I tested it on, let's batch-apply it to the rest!"
    – JohnB
    Jun 1, 2013 at 16:59
  • 1
    Yeah - it could definitely be done better. In this case a reason could be that the icons had to be as lean as possible, as Lubuntu claims to be a very lightweight Linux distribution.
    – Takkat
    Jun 1, 2013 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.