soimy / msdf-bmfont-xml

Generate BMFont texture and spec XML using msdfgen

Home Page:https://soimy.github.io/msdf-bmfont-xml/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI doesn't work

subdan opened this issue · comments

I get this error:

$ msdf-bmfont
env: node\r: No such file or directory

Executable file from bin folder also doesn't work
msdfgen.osx msdf -font Arial.ttf

Unknown setting or insufficient parameters: -font
Unknown setting or insufficient parameters: Arial.ttf
Use -help for more information.
No input specified! Use either -svg <file.svg> or -font <file.ttf/otf> <character code>, or see -help.

@subdan can you confirm node.js executable is in your path? Just type node -v to confirm it.
msdfgen.osx is not the executable you want.

$ node -v
v8.4.0

@subdan Thanks for the reporting, it seems an issue npm/npm#12371 and the recent version is published via windows. I'm fixing now

Windows version of your CLI also doesn't work.
screen shot 2017-08-26 at 17 12 48

@subdan can you try re-install it? From your log it seems one of the core dependencies node-canvas-prebuilt download failed with a 404.

Yes, I can but in an 1-2 hours.

OSX env: node\r: No such file or directory issue should be fixed in f151c19
And now bump to new version 2.2.3 with new option --tolerance
Try update it via npm update -g msdf-bmfont-xml

@subdan Just noticed that there is no node-canvas-prebuilt support for arch ia32, only x64. If you only have 32bit windows, you should manually install node-canvas instead. Here is how:
install pre-requirement for windows , then:

git clone https://github.com/soimy/msdf-bmfont-xml.git
npm install canvas

in file index.js replace const canvas = require('canvas-prebuilt') to const canvas = require('canvas')

npm link

Win: Re-install didn't help. I still get 404 error.
macOS: Now it works!

I'm closing this issue after finding out canvas-prebuilt will not support win32-ia32 arch