sapegin / grunt-webfont

SVG to webfont converter for Grunt
MIT License
1.1k stars 210 forks source link

Error running fontforge when directory path contains whitespaces #323

Closed lajy78 closed 8 years ago

lajy78 commented 8 years ago

In the file fontforge.js line 31 :

// Run Fontforge
var args = [
    'fontforge',
    '-script',
    path.join(__dirname, 'fontforge/generate.py')
].join(' ');

fontforge can not be launched when the value of the variable "__dirname" contains whitespaces.

Is it possible to fix it?

Thanks.

sapegin commented 8 years ago

It shouldn’t be difficult. I’ll be happy to merge a pull request with a fix.

simonmosse commented 8 years ago

Has anyone found a fix for this? Too many of my folder names have spaces for me to get around this by just renaming them all :( It would be very very welcome. Thanks in advance :)

steveh80 commented 8 years ago

This isn't too hard to fix, just change the code in line 31 to:

'"' + path.join(__dirname, 'fontforge/generate.py') + '"'

I don't know if this is an elegant solution to this problem, but it works on my side. I'd love to see this fixed in the next release.

sapegin commented 8 years ago

And already fixed, that’s why this issue was closed with a link to a pull request.

This kind of comments are quite useless: if you know how to fix something just send a pull request.