Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected array default value for '--templates'; got "css preview" (string) #354

Open
dingo-d opened this issue Aug 31, 2017 · 4 comments
Open

Comments

@dingo-d
Copy link

dingo-d commented Aug 31, 2017

I added new icons to my icons folder and tried to compile it using

fontcustom compile app/assets/icons/ --config=config/fontcustom.yml

But I get the following error

Compiling icons...
Expected array default value for '--templates'; got "css preview" (string)
       debug  Using settings from `config/fontcustom.yml`.
       debug  Using options:
                {:input=>{:vectors=>"app/assets/icons/", :templates=>"app/assets/icons/"},
                :output=>
                 {:fonts=>"app/assets/fonts/project",
                  :css=>"app/assets/stylesheets",
                  :preview=>"app/assets/fonts/project"},
                :config=>"config/fontcustom.yml",
                :templates=>["scss-rails", "preview"],
                :font_name=>"project-icons",
                :font_design_size=>16,
                :font_em=>512,
                :font_ascent=>448,
                :font_descent=>64,
                :css_selector=>".i-{{glyph}}",
                :preprocessor_path=>"project/",
                :autowidth=>false,
                :no_hash=>false,
                :debug=>true,
                :force=>false,
                :quiet=>false}
      create  .fontcustom-manifest.json
       debug  Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
               License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
               with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
               Based on sources from 21:22 UTC  6-Aug-2017-D.
               Based on source from git with hash: 
       error  `fontforge` compilation failed.
.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fontcustom-1.3.8/lib/fontcustom/generator/font.rb:92:in `create_fonts'
    .rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fontcustom-1.3.8/lib/fontcustom/generator/font.rb:20:in `generate'
    .rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fontcustom-1.3.8/lib/fontcustom/base.rb:50:in `start_generators'
    .rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fontcustom-1.3.8/lib/fontcustom/base.rb:22:in `compile'
    .rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fontcustom-1.3.8/lib/fontcustom/cli.rb:77:in `compile'
    .rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
    .rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
    .rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
    .rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
    .rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fontcustom-1.3.8/bin/fontcustom:5:in `<top (required)>'
    .rbenv/versions/2.3.0/bin/fontcustom:23:in `load'
    .rbenv/versions/2.3.0/bin/fontcustom:23:in `<main>'

The project is using the latest fontcustom gem (2.0.0)

@brennenawana
Copy link

@dingo-d

  • First upgrade to fontcustom 2.0.0
  • Then go to .rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/fontcustom-1.3.8/lib/fontcustom.rb and change line 22 to:
    :templates => %w|css preview|

@dingo-d
Copy link
Author

dingo-d commented Oct 11, 2017

I will try this, thanks!

@stretchkennedy
Copy link
Contributor

stretchkennedy commented Nov 21, 2017

This was fixed in #346 (see #344), but a new version of the gem hasn't been released. You can install the fontcustom gem from github by following the instructions from the README, but replacing

gem install fontcustom

with

git clone https://github.com/FontCustom/fontcustom.git && cd fontcustom
gem build fontcustom.gemspec
gem install fontcustom-*.gem

Alternatively, if you're using bundler, you can change the entry in your Gemfile to

gem 'fontcustom', git: 'https://github.com/FontCustom/fontcustom.git'

@JakeBeresford Would it be possible to release a new minor version of the gem? A few people seem to be having trouble with it.

@MUllman
Copy link

MUllman commented Nov 27, 2017

tried that and now get
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 508: ordinal not in range(128) error fontforge compilation failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants