- SF Symbols App
- Node.js
- Inkscape (optional)
- Clone or download this repository
- run
npm install
Follow the instructions from Apple
- export required symbols from SF Symbols App as version 4+
- run
node prepare.js path/to/svg-folder
creates a result folder in your working directory - run
node test/server.js
and inspect symbols in a webbrowser - (optional) optimize symbols with Inkscape
For all script arguments run node prepare.js --help
- open svg in Inkscape
- duplicate both overlapping files
- path > difference
- save a copy
- past only new created path to existing svg
- delete attribute id and keep only hierarchical (primary) class on new path. Eg.
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="7.79 -90 108 108"> <path class="monochrome-0 multicolor-0:indigo" fill="#5856d6" d="m 9 ..."/> <path class="monochrome-1#clear multicolor-1:gray#clear hierarchical-1:secondary#clear" fill="#8e8e93" d="m 10 ..."/> <path class="hierarchical-0:primary" d="M 22 ..."/> </svg>
Search for tertiary#clear
, secondary#clear
to find the few icons which need this optimization.
- SF Symbols width is variable. The script fit them into a square.
- Please check copyright of used symbols.