webfonts-generator icon indicating copy to clipboard operation
webfonts-generator copied to clipboard

There is error when generate one svg icon to font

Open wszhi opened this issue 7 years ago • 3 comments

I followed the steps in Readme.

There is only one svg image in files, and code as below:


webfontsGenerator(
  {
    files: ['src/assets/icons/story-card.svg'],
    dest: 'icon-dist/'
  },
  function(error) {
    if (error) {
      console.log('Fail!', error);
    } else {
      console.log('Done!');
    }
  }
);

When I run, will return error, the error message is

Fail! Checksum error in glyf

wszhi avatar Jun 29 '18 06:06 wszhi

I ran into the same issue.

vahidshirvani avatar Jul 17 '18 11:07 vahidshirvani

It seems that this error is thrown from ttf2woff library. However when I manually generate a ttf from svg with svg2ttf and then use that ttf as input to ttf2woff then it works. So that means that this library has a bug somewhere in the font conversion chain.

vahidshirvani avatar Jul 19 '18 11:07 vahidshirvani

I face a same error when convert google logo svg. The google logo svg is single icon with multi color. The multi color property may cause the error.

raykin avatar Nov 06 '18 02:11 raykin