webfonts-generator
webfonts-generator copied to clipboard
There is error when generate one svg icon to font
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
I ran into the same issue.
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.
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.