Closed nfroidure closed 9 years ago
Currently, only the README is updated so please provide your feedback since it's still just an idea
I like the API like this. Much better than my suggestion.
How do you envision the integration into gulp-svgicons2svgfont to look like?
Is the idea that glyphs become ligatures when codepoints.length > 1
? Why not just write the ligature inside a string: codepoints: '\uE001\uE002'
? The array notation could then be used to define multiple codepoints for a glyph: codepoints: ['\uE001\uE002', 'fi']
…
The syntax codepoints: [[0xE001, 0xE002], [102, 105]]
could be used for people who would rather use numbers for code points.
Optionally, some auto-detection magic could be used to transform [102, 105]
to [[102, 105]]
and 102
to [[102]]
for convenience.
Of course it would be nice to be able to mix-and-match the two approaches: codepoints: [[0xE001, 0xE002], 'fi']
.
@sabberworm i agree with the string form but in order to facilitate the 1.0 to 2.0 migration, i renamed the codepoints option to unicode. Since it is the name of the property in the generated SVG font, it make more sense. https://github.com/nfroidure/svgicons2svgfont/blob/ea6dc71200ba4f66efce156f4b78f0470c51d470/README.md
Here starts the new svgicons2svgfont with breaking changes:
And new features:
Call for advice: @sapegin @puzrin @sabberworm