Tracked every icon width by hand in a notebook for 4 months, now a 12-line Node script does it in 2 seconds | Crafting With Code - The Design Community Hub
Tracked every icon width by hand in a notebook for 4 months, now a 12-line Node script does it in 2 seconds
When I started my icon set last spring, I literally kept a spiral notebook with the pixel width of every glyph written next to its name, and I'd recheck them by zooming to 800% in Illustrator one at a time. Around 40 icons in, I was spending a whole Sunday just catching drift where a stroke sat one pixel off from its neighbor. So I wrote a small Node script that reads the SVG folder and logs any glyph whose bounding box doesn't land on the same baseline grid, then tosses the bad ones into a report file. Now I run it after every batch and it flags maybe 3 or 4 icons out of 60, usually the rounded ones. The script took me about an hour to get working and has probably given me back 15 hours since. Anyone have a cleaner way to check stroke weight consistency across a whole set, or is a bounding box check about as far as a simple script can go?