
Build an icon font from SVGs
Turn a set of single-shape icon SVGs into one icon font: an SVG font document built by hand, then svg2ttf and ttf2woff for TTF and WOFF, plus a CSS snippet. WOFF2 is not produced here; no MIT or Apache wasm encoder for it exists yet.
Build an icon font from SVGs turns single-shape icons into an SVG font document, then svg2ttf and ttf2woff render TTF and WOFF, alongside a CSS snippet. Chars assigns one character per dropped file, in order, under familyName. An icon still carrying a transform after svgo flattening is refused. WOFF2 never comes out, since no small wasm encoder exists for it.
Questions
How does chars map to my files?
One character per file, matched to files in the order you dropped them; chars must contain exactly as many characters as you dropped files, counted by Unicode code point rather than by UTF-16 unit.
Why was one of my icons refused?
Either it still carried a transform after being run through svgo, or it still had an unconverted shape element such as a circle, ellipse, rect, line, polyline or polygon that svgo can not turn into a path; this tool only turns plain, transform-free path shapes into a glyph outline.
What files do I get back?
A .ttf file, a .woff file, and a .css file with a ready-made @font-face rule plus one .icon-XXXX class per glyph, named familyName in each case.
Why is there no WOFF2 file?
Because no small MIT or Apache licensed wasm encoder for WOFF2 exists yet that this project can bundle, so only TTF and WOFF come out of the build.
What if two of my files share the same character?
It refuses with chars has a repeated character, since every glyph needs its own distinct codepoint in the font.
What does familyName control?
The font-family name written into the font itself and into the generated CSS, MyIconFont by default.