FontCustom / fontcustom

Generate custom icon webfonts from the comfort of the command line.
3.29k stars 423 forks source link

"Failed to parse colour" error, not generating preview files #109

Closed cslarson closed 10 years ago

cslarson commented 11 years ago

I'm using fontcustom-1.0.1 on ubuntu 13.04 and can generate the font files but not the corresponding html & css preview files. During compile I get the following error (the svg files in this instance are from https://github.com/somerandomdude/Iconic but the same occurs with my own Inkscape generated svg files). I can use the font files by manually mapping the icons to their character codes, but they do not work in ie8 and I'm hoping the generated css would give me the correct code to fix this.

DEBUG: (raw output from fontforge)
["Failed to parse colour ", "Failed to parse colour ", "{\"glyphs\": [\"arrow_up_alt2\", \"arrow_up\", \"arrow_up_alt1\"], \"fonts\": [\"icon-font.ttf\", \"icon-font.woff\", \"icon-font.eot\", \"icon-font.svg\"], \"file_name\": \"icon-font\"}"]
/var/lib/gems/1.9.1/gems/json-1.8.0/lib/json/common.rb:155:in `parse': 757: unexpected token at 'Failed to parse colour ' (JSON::ParserError)
    from /var/lib/gems/1.9.1/gems/json-1.8.0/lib/json/common.rb:155:in `parse'
    from /var/lib/gems/1.9.1/gems/fontcustom-1.0.1/lib/fontcustom/generator/font.rb:88:in `collect_data'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `block in invoke_all'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `each'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `map'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:127:in `invoke_all'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/group.rb:233:in `dispatch'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /var/lib/gems/1.9.1/gems/fontcustom-1.0.1/lib/fontcustom/cli.rb:30:in `compile'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /var/lib/gems/1.9.1/gems/fontcustom-1.0.1/bin/fontcustom:5:in `<top (required)>'
    from /usr/local/bin/fontcustom:23:in `load'
    from /usr/local/bin/fontcustom:23:in `<main>'
cslarson commented 11 years ago

I was able to get my font to work in ie8 by correcting the css. I think my problem was not putting quotes around the font-family attribute. I followed the following instructions: http://css-tricks.com/snippets/css/using-font-face/