This project converts Font Awesome Free SVG icons into PNG files with
controlled padding, transparent background, and forced white color using
currentColor.
It is designed for batch exporting icons in multiple sizes with a clean and predictable directory structure.
- Converts Font Awesome Free SVGs (
solid,regular,brands) - Outputs PNG with:
- Transparent background
- White icons via
currentColor - Controlled padding
- Generates multiple sizes in one run
- Progress bar in terminal
- Cleans output directory before exporting
- 800×800 with 110px padding
- 196×196 with proportional padding
out/
├─ 800/
│ ├─ solid/
│ ├─ regular/
│ └─ brands/
├─ 196/
│ ├─ solid/
│ ├─ regular/
│ └─ brands/
- Node.js 18+
- npm
npm installnpm startThis will:
- Remove the existing
out/directory (if present) - Convert all Font Awesome SVG icons
- Generate PNGs in both sizes with a progress bar
- Only Font Awesome Free icons are included by default
- Make sure you comply with Font Awesome licensing if you adapt this for Pro
- The script does not depend on
process.cwd()and can be run from anywhere
- Script author: Mário Valney with ChatGPT