[sugar] icon assistance/validation

Eben Eliason eben.eliason at gmail.com
Sat Mar 15 20:51:38 EDT 2008


Sorry I'm so late to this thread.  I've been meaning for some time now
to provide a template and a script for easily creating sugar icons.
The delay was due, in large part, to the fact that I've been working
in Illustrator and my scripts were created as time-savers for myself.
Unfortunately, Illustrator and Inkscape store their SVGs in different
formats, which meant my scripts didn't work for Inkscape at all, and I
knew they must in oder to be useful to most others.

Anyway, I've attached icon template files for both Illustrator and
Inkscape (They are effectively the same, though their formats play
nice with their respective editors, particularly with regard to
layers).  I've also attached my command-line python script,
sugar-iconify, which can take an .svg created with the template (in
theory, most generic ones as well) and produce one or more
sugar-compatible .svg files with proper entities.

The major advantage of my script, which developers may find useful, is
the -m multiple export option, which will split an svg into multiple
output files by top level group, each containing the proper entities.
The exported icons will assume the name of their layer in the source
file. (Please note that you must save in the inkscape .svg format, not
plain, in order to receive proper naming; otherwise their names will
be generic eg. "layer1")  If you don't pass the -m option, the
formatted .svg will be saved in place of the input.

The template files also have a few extra layers in them.  A "_padding"
layer provides a template which illustrates the recommended and
maximum regions that an icon may reside in.  A "_swatches" layer
contains several small squares in all possible combinations of stroke
and fill color pairs.  I know in illustrator it's quite easy to
"paint" a given shape by assuming the colors of one of these swatches;
I'm less familiar with Inkscape techniques.  The colors of these
swatches match the defaults which sugar-iconify uses to insert the
proper entities.  You can leave these layers within the .svg file, as
the script will ignore/strip any top level layers beginning with an
underscore.

I hope that provides a fair enough description for people to try it
out and give me some feedback.  I intend to post complete
instructions, along with some examples, to the wiki when I get a
chance.  For now, just run sugar-iconify -h to see the available
options.  Feel free to suggest (or provide) changes to the script, and
definitely let me know if anything is confusing or doesn't appear to
function as intended.  Thanks!

- Eben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icon_template.illustrator.svg
Type: image/svg+xml
Size: 1816 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080315/cd93fb67/attachment.svg 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icon_template.inkscape.svg
Type: image/svg+xml
Size: 5075 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080315/cd93fb67/attachment-0001.svg 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sugar-iconify
Type: application/octet-stream
Size: 7950 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080315/cd93fb67/attachment.obj 


More information about the Sugar mailing list