DEV Community 👩‍💻👨‍💻

Saulo Dias
Saulo Dias

Posted on

Convert SVGs from Stroke to Path

I had to convert more than one thousand SVG files from stroke to path. That's because IcoMoon.io can't handle SVG files with strokes. Instead you have to provide the SVG files for your font containing only path elements.

This bash script does the job for you. You only need to install Inkscape and add it to the Windows PATH (C:\Program Files\Inkscape\bin in my case).

Then you run the script below in the folder with the SVG files.
bash stroke2path.sh

The repeated actions are kind of a hack to make sure everything is ungrouped before we can convert it to path. You might get some error messages because of that, but that should not affect the end result.

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Just kidding, it's a personal preference. But you can change your theme, font, etc. in your settings.

The more you know. 🌈