DragonsInn / fontgen-loader

Automated webfont generation from SVG icons. Use with WebPack!
125 stars 42 forks source link

Generic error if SVG file cannot be converted #35

Closed ha7ilm closed 7 years ago

ha7ilm commented 7 years ago

I wanted to convert a custom icon I've created in Inkscape, but I've got an error like this:

ERROR in ./~/css-loader!./~/fontgen-loader!./my.font.json
Module build failed: 
 @ ./my.font.json 4:14-118
 @ ./frontend.jsx

I did not understand what was the problem, because the error message did not include any further description (is it a problem with the config, the code or the files).

Later I figured out that the SVG used some Inkscape specific features. To fix that:

After that, the font was successfully built.

jeerbl commented 7 years ago

So, what is the issue again?

jeerbl commented 7 years ago

Btw, I took over the project as this one was not being updated anymore.

New project is here.

Thx Jerome

ha7ilm commented 7 years ago

This is a very minor issue. It took me some time to find out that the build failed because the SVG was not the right format. An error like Module build failed: invalid SVG format or webfonts-generator failed would have helped.

Partially I've opened the issue to document the way to fix it if someone else would use Inkscape to draw the SVGs directly. I think I wouldn't have had this issue if I used e.g. FontForge.

Right now the project works great for me anyway, thank you for that!

jeerbl commented 7 years ago

Ok I see.

Though you have to know that this project is just a proxy between Webpack and the webfonts-generator project so I guess this kind of invalid format errors should be handled there.

Don't hesitate to open an issue there or make a pull request directly.

Cheers Jerome

ha7ilm commented 7 years ago

OK!