sunflowerdeath / webfonts-generator

Generator of webfonts from svg icons
The Unlicense
271 stars 152 forks source link

Add support for passing multiple glyph codes for a single icon #37

Open macku opened 6 years ago

macku commented 6 years ago

The svgicons2svgfont tool allows you to pass the multiple glyph codes for the same icon.

Example from their page:

// Multiple unicode values are possible
const glyph2 = fs.createReadStream('icons/icon1.svg');
glyph2.metadata = {
  unicode: ['\uE002', '\uEA02'],
  name: 'icon2'
};

I wanted to add the same support to webfonts-generator.

The changes are backwards compatible, so as a user of this library you don't need to change anything - no breaking changes.

macku commented 6 years ago

@sunflowerdeath: Would you mind reviewing this? 😄