ubuntu / yaru

All Ubuntu Yaru GNOME themes

Home Page:https://community.ubuntu.com/c/desktop/theme-refresh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separate src icons in SVG in all resolutions?

elioqoshi opened this issue · comments

Hola!

I was wondering if there is any way to easily fetch all svg icons in Yaru in all its resulting resolutions (16-256px) as separate svg files? The hope is to create a Figma icon library where all icons are easily accessible. @madsrh do you know maybe?

Hi @elioqoshi
As all sizes of an icon are bundled into a single svg file, this would require creating an export script.
But we already have a bitmap export script, and it shouldn't be very complicated to adapt it.
I'll try to see what I can do 🙂

@Jupi007 That would be very much appreciated and save us a dozen of manual hours! I hope we can get a Figma library useful for the wider community then.

@elioqoshi I did a modified version of our render script:

render-vectors.zip

You need to put both files in icons/src/fullcolor/ and also to have SVGO and Inkscape installed.
Then run the python script with:

./render-vector.py --dest-path=DEST_PATH

Replace DEST_PATH with the destination folder.

Be careful because rendering every icons at all size will take a very long time!

There is just one problem, even if I added the correct SVGO configuration, almost every object outside the exported file canvas are kept. I searched during a long time without find a solution.