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

Help, not getting any output. #159

Closed
mchudnov opened this issue Dec 18, 2013 · 28 comments
Closed

Help, not getting any output. #159

mchudnov opened this issue Dec 18, 2013 · 28 comments

Comments

@mchudnov
Copy link

Hello,

I am trying to use fontcustom to create some icons to use on a new webpage. Admittedly I don't have a lot of experience with stuff like this, but have followed instructions and searched the web for solutions.

As far as I can tell I've installed everything and things should work.

I can run/create the config file (in the directory where my *.svg files are found, but I can't compile the files and get any kind of output.

What am I doing wrong? Any help you give would be greatly appreciated.

I'm sure you'll need some more info, but not sure what to give, but will send any information you require.

Thanks in advance!

@kaizau
Copy link
Member

kaizau commented Dec 18, 2013

No sweat, happy to help. Can you provide:

  1. the output of fontcustom --version && fontforge --version
  2. content of your config file
  3. screenshot(s) of the folder structure

@mchudnov
Copy link
Author

FontCustom: fontcustom-1.3.0.beta3
FontForge:
Copyright (c) 2000-2012 by George Williams.
Executable based on sources from 14:57 GMT 31-Jul-2012-D.
Library based on sources from 14:57 GMT 31-Jul-2012.
fontforge 20120731
libfontforge 20120731

config file:

---------------------------------------------------------------------------

Project Info

Defaults shown. Learn more about these options by running

fontcustom help or visiting http://fontcustom.com.

---------------------------------------------------------------------------

font_name: newicons
#css_selector: .icon-{{glyph}}
#preprocessor_path: ""
#autowidth: false
#no_hash: false
#force: false
#debug: false
#quiet: false

---------------------------------------------------------------------------

Input Paths

---------------------------------------------------------------------------

#input: assets/fonts/fontcustom/source # as a string

OR

#input: # as a hash
vectors: vectors

templates: app/assets/fonts/fontcustom/templates

---------------------------------------------------------------------------

Output Paths

---------------------------------------------------------------------------

#output: assets/fonts/fontcustom # as a string

OR

#output: # as a hash
fonts: .

css: app/assets/stylesheets

preview: app/views/styleguide

my-custom-template.yml: config

---------------------------------------------------------------------------

Templates

Included in Font Custom: preview, css, scss, scss-rails

Custom templates should be saved in the INPUT[:templates] directory and

referenced by their baserame.

---------------------------------------------------------------------------

#templates:

- scss

- preview

- my-custom-template.yml

Screenshot:
screen shot 2013-12-18 at 11 57 44 am

not sure why the formatting of the config file is so messed up, sorry.

Looking forward to your response.

Thanks in advance!

@mchudnov
Copy link
Author

Any ideas of where to start to fix the problem would be greatly appreciated. Trying to surprise my fiance with a wedding website!

Thanks

@kaizau
Copy link
Member

kaizau commented Dec 19, 2013

Congrats! Might be the best use of Font Custom I've heard to date.

First problem is your YAML syntax:

#input: # as a hash
vectors: vectors

Should be:

input: # as a hash
  vectors: vectors

Ditto for the output hash / string. If you want to generate fonts into the current directory, you'll need output: . or

output:
  fonts: .

not fonts: ..

Second thing is that your SVGs are actually in the working directory, which means Fontcustom will look for them in ./vectors and find nothing. This should trigger an error message, so let me know if it didn't.

Final thing is that putting input and output into the same directory will cause problems on your second compile, when the generated SVG font is read in as a separate vector.

Hope that helps, let me know if that gets you back on track.

@mchudnov
Copy link
Author

Ok, still having some trouble.

Here's my config file:

\# --------------------------------------------------------------------------- \#
\# Project Info
\#   Defaults shown. Learn more about these options by running
\#   `fontcustom help` or visiting <http://fontcustom.com>.
\# --------------------------------------------------------------------------- \#

font_name: WeddingIcons
\#css_selector: .icon-{{glyph}}
\#preprocessor_path: ""
\#autowidth: false
\#no_hash: false
\#force: false
\#debug: false
\#quiet: false


\# --------------------------------------------------------------------------- \#
\# Input Paths
\# --------------------------------------------------------------------------- \#

\#input: assets/fonts/fontcustom/source                  \# as a string

\# OR

input:
 vectors: vectors
\#  templates: app/assets/fonts/fontcustom/templates


\# --------------------------------------------------------------------------- \#
\# Output Paths
\# --------------------------------------------------------------------------- \#

\#output: assets/fonts/fontcustom                        \# as a string

\# OR

output: 
 fonts: .
\#  css: app/assets/stylesheets
\#  preview: app/views/styleguide
\#  my-custom-template.yml: config


\# --------------------------------------------------------------------------- \#
\# Templates
\#   Included in Font Custom: preview, css, scss, scss-rails
\#   Custom templates should be saved in the INPUT[:templates] directory and
\#   referenced by their baserame.
\# --------------------------------------------------------------------------- \#

\#templates:
 - scss
 - preview
 - css
\# - my-custom-template.yml

Here's my new folder structure:
screen shot 2013-12-18 at 9 50 58 pm

So i enter: fontcustom compile /Desktop/Wedding/WeddingIcons/vectors

and this is what I get:
/Library/Ruby/Gems/1.8/gems/fontcustom-1.3.0.beta3/lib/fontcustom/base.rb:47:in checksum': undefined methodflatten' for #Hash:0x10180ac30 (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/fontcustom-1.3.0.beta3/lib/fontcustom/base.rb:14:in compile' from /Library/Ruby/Gems/1.8/gems/fontcustom-1.3.0.beta3/lib/fontcustom/cli.rb:66:incompile'
from /Library/Ruby/Gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:in __send__' from /Library/Ruby/Gems/1.8/gems/thor-0.18.1/lib/thor/command.rb:27:inrun'
from /Library/Ruby/Gems/1.8/gems/thor-0.18.1/lib/thor/invocation.rb:120:in invoke_command' from /Library/Ruby/Gems/1.8/gems/thor-0.18.1/lib/thor.rb:363:indispatch'
from /Library/Ruby/Gems/1.8/gems/thor-0.18.1/lib/thor/base.rb:439:in start' from /Library/Ruby/Gems/1.8/gems/fontcustom-1.3.0.beta3/bin/fontcustom:5 from /usr/bin/fontcustom:23:inload'
from /usr/bin/fontcustom:23

I don't get any new files or anything.

Thanks for the help!

@kaizau
Copy link
Member

kaizau commented Dec 19, 2013

Hmm. Are you running the command from /Desktop/Wedding/WeddingIcons? The latest version of Font Custom needs to be run from the directory where fontcustom.yml lives.

Also, are you on ruby 1.9.2+?

@mchudnov
Copy link
Author

Still not working.

ruby -v: ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin10.8.0]

yes, i think i'm running the command from the WeddingIcons folder, how can i know for sure?

The response I am getting now is:
status Loading configuration file at fontcustom.yml.

Thanks

@kaizau
Copy link
Member

kaizau commented Dec 19, 2013

The pwd will tell you where you are.

Seems like something else is wrong in your fontcustom.yml. From your previous paste, looks like you need to uncomment #templates as well.

@mchudnov
Copy link
Author

Changed that and still no luck, now the message i receive is:

status Loading configuration file at fontcustom.yml.
error fontforge compilation failed. Try again with --debug for more details.

@mchudnov
Copy link
Author

just a thought are you able to send me a working foncustom.yml I can just cut and past?

@kaizau
Copy link
Member

kaizau commented Dec 19, 2013

Have you tried it with --debug to get more info?

@mchudnov
Copy link
Author

I didn't and now when i'm running it it only says:

  status  Loading configuration file at `fontcustom.yml`.

this is no matter what directory I try to compile, even if i type the words wrong to a non-existant file.

What am I missing?

@mchudnov
Copy link
Author

Hi Again,

Still no luck, so I thought I'd try again, from the beginning. So here is everything I do, maybe you can help me figure out where I've gone wrong.

  1. Made a new foldin my root directory called: IconTest
  2. Open Terminal
  3. Change Directory to the IconTest Folder: cd \IconTest
    results: amy-underhills-macbook-pro:IconTest amyunderhill$
  4. Create a new folder within the IconTest folder called 'Vectors'
  5. Add 2 *.svg files to the new 'Vectors' folder
  6. In Terminal create a new config file in the 'IconTest' folder: fontcustom config .
    results: create fontcustom.yml (and the fontcustom.yml file was created in the 'IconTest' dir)
  7. Edit the config file:
font_name: WeddingIcons
input:
  vectors: Vectors

output:
  fonts: Fonts

templates: [ scss, preview, my-custom-template.yml ]
  1. Save the changes to the fontcustom.yml file
  2. In Terminal compile the new font: fontcustom compile .
    results: status Loading configuration file at fontcustom.yml

So that's what I do, and all I get is: "status Loading configuration file at 'fontcustom.yml'" but no folders or files are created.

Any help would be greatly appreciated. Please Please!

Thanks

@kaizau
Copy link
Member

kaizau commented Dec 20, 2013

Hm... there's nothing that sticks out here. Try installing the latest beta (4), which should have better error messages.

@mchudnov
Copy link
Author

Hi,

Thanks again for all your help with this. I've updated to the newest version of fontcustom and have really taken things back to basic and am trying to convert just one svg file.

I seem to have made some progress because ow when I run:
fontcustom compile /Vectors

A new 'fonts' folder is created (it is empty) and I get an error:
error 'fontforge' compilation failed. Try again with --debug for more details.

When I re-run with --debug at the end this is what I get:

debug  Generated files will be saved to 'fontcustom/'.
      create  fontcustom
       debug  Copyright (c) 2000-2012 by George Williams.
 Executable based on sources from 14:57 GMT 31-Jul-2012-D.
 Library based on sources from 14:57 GMT 31-Jul-2012.
Traceback (most recent call last):
  File "/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0.beta/lib/fontcustom/scripts/generate.py", line 20, in <module>
    parser.add_option('manifest', help='Path to .fontcustom-manifest.json')
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py", line 998, in add_option
    option = self.option_class(*args, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py", line 552, in __init__
    self._set_opt_strings(opts)
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/optparse.py", line 592, in _set_opt_strings
    self)
optparse.OptionError: invalid long option string 'manifest': must start with --, followed by non-dash
              []
       error  'fontforge' compilation failed.
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0.beta/lib/fontcustom/generator/font.rb:86:in 'create_fonts'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0.beta/lib/fontcustom/generator/font.rb:20:in 'generate'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0.beta/lib/fontcustom/base.rb:52:in 'start_generators'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0.beta/lib/fontcustom/base.rb:17:in 'compile'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0.beta/lib/fontcustom/cli.rb:66:in 'compile'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/command.rb:27:in 'run'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/invocation.rb:120:in 'invoke_command'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor.rb:363:in 'dispatch'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/base.rb:439:in 'start'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0.beta/bin/fontcustom:5:in '<top (required)>'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/fontcustom:23:in 'load'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/fontcustom:23:in '<main>'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in 'eval'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in '<main>'

I poked around a bit on the forums and see that maybe it's a problem with my *svg file. How can I know? I can I ensure that my vectors are basic and not complex?

Any help would be great! Still hoping to sort this out.

Thanks...

@kaizau
Copy link
Member

kaizau commented Dec 24, 2013

Ahhh, that gives me a clue. I've baked the fix into the latest version — gem install fontcustom and let me know if that does it for you.

@mchudnov
Copy link
Author

Ok, some progress.

I installed the latest version and tried again. This time some folders and such were created as per the config file, but they're still all empty.

Again when I run the compile it says I should run with --debug. When I do, here is the output:

       debug  Using settings from `fontcustom.yml`.
       debug  Using options:
                {:input=>{:vectors=>"Vectors", :templates=>"Vectors"},
                :output=>{:fonts=>"fonts", :css=>"stylesheets", :preview=>"styleguide"},
                :config=>"fontcustom.yml",
                :templates=>["scss", "preview"],
                :font_name=>"fontcustom",
                :css_selector=>".icon-{{glyph}}",
                :preprocessor_path=>"",
                :autowidth=>false,
                :no_hash=>false,
                :debug=>true,
                :force=>false,
                :quiet=>false}
      create  fonts
      create  stylesheets
      create  styleguide
       debug  Copyright (c) 2000-2012 by George Williams.
               Executable based on sources from 14:57 GMT 31-Jul-2012-D.
               Library based on sources from 14:57 GMT 31-Jul-2012.
              Traceback (most recent call last):
                File "/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0/lib/fontcustom/scripts/generate.py", line 22, in <module>
                  manifestfile = open(args.manifest, 'r+')
              AttributeError: 'list' object has no attribute 'manifest'
       error  `fontforge` compilation failed.
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0/lib/fontcustom/generator/font.rb:92:in `create_fonts'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0/lib/fontcustom/generator/font.rb:20:in `generate'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0/lib/fontcustom/base.rb:50:in `start_generators'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0/lib/fontcustom/base.rb:22:in `compile'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0/lib/fontcustom/cli.rb:58:in `compile'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.0/bin/fontcustom:5:in `<top (required)>'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/fontcustom:23:in `load'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/fontcustom:23:in `<main>'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'

So is there still hope? Can you still help?

Thanks for all your effort!

@kaizau
Copy link
Member

kaizau commented Dec 28, 2013

Looks like I didn't completely fix the python bug. I'll try to squeeze in a patch ASAP.

@kaizau
Copy link
Member

kaizau commented Dec 28, 2013

Screw it — I went ahead and did it. Let me know if 1.3.1 does the trick!

@mchudnov
Copy link
Author

Thanks for looking at this so quickly and so often, and trying to push that fix through last night.

Still seem to have the same problem. Here is what I get when I run fontcustom compile --debug

   debug  Using settings from `fontcustom.yml`.
       debug  Using options:
                {:input=>{:vectors=>"Vectors", :templates=>"Vectors"},
                :output=>
                 {:fonts=>"output/fonts",
                  :css=>"output/stylesheets",
                  :preview=>"output/styleguide"},
                :config=>"fontcustom.yml",
                :templates=>["scss", "preview"],
                :font_name=>"fontcustom",
                :css_selector=>".icon-{{glyph}}",
                :preprocessor_path=>"",
                :autowidth=>false,
                :no_hash=>false,
                :debug=>true,
                :force=>false,
                :quiet=>false}
      create  output/fonts
      create  output/stylesheets
      create  output/styleguide
       debug  Copyright (c) 2000-2012 by George Williams.
               Executable based on sources from 14:57 GMT 31-Jul-2012-D.
               Library based on sources from 14:57 GMT 31-Jul-2012.
              I'm sorry this file is too complex for me to understand (or is erroneous)
              fontforge(16485) malloc: *** error for object 0x10110a8c8: pointer being freed was not allocated
              *** set a breakpoint in malloc_error_break to debug
       error  `fontforge` compilation failed.
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.1/lib/fontcustom/generator/font.rb:92:in `create_fonts'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.1/lib/fontcustom/generator/font.rb:20:in `generate'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.1/lib/fontcustom/base.rb:50:in `start_generators'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.1/lib/fontcustom/base.rb:22:in `compile'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.1/lib/fontcustom/cli.rb:58:in `compile'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/gems/fontcustom-1.3.1/bin/fontcustom:5:in `<top (required)>'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/fontcustom:23:in `load'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/fontcustom:23:in `<main>'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/Users/amyunderhill/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'

I know with your continued help we can get this sorted out.
I can't thank you enough for your continued help!

@kaizau
Copy link
Member

kaizau commented Dec 29, 2013

Wow, you've hit a really unfortunately number of edge cases. This particular one is in fontforge, the underlying software behind Font Custom.

It sounds like there might be one or more offending SVGs (too big, too many layers, etc.). A couple options:

  1. Try running compile with different subsets of your SVGs to try and isolate any problem glyphs. If you find them, please paste them here — I'd love to know about them.
  2. Try upgrading Fontforge brew update && brew upgrade fontforge

@mchudnov
Copy link
Author

OK, finally some progress!

I updated / upgraded as you suggested. I am now trying to just use one icon (test.svg) in a folder, and success a bunch of files are made. However, the icon seems to be blank rather then the icon I've drawn. I don't get any errors or anything in terminal and it seems like all the files/folders are created, but when I try to open the fontcustom-preview.html each of the vectors (progressing in size) is just blank and it looks like the text says "f1ob" (or something like that).

Any idea what my problem is now? I feel like we're getting so close. I can't thank you enough!

Thanks.

@kaizau
Copy link
Member

kaizau commented Dec 29, 2013

Strange. Can you post a zip with the SVGs and the generated files?

Also, what do you see when you run --debug?

@mchudnov
Copy link
Author

ok reading through some other comment threads, i think i've figured out that my .svg files must have a white layer somehow and that's why i'm getting all white images in the output. Can you help me figure out how to get rid of the white layer? I think that will solve the problem!

Thanks!

@kaizau
Copy link
Member

kaizau commented Jan 14, 2014

Colors aren't baked into fonts, which means a solid white layer would actually appear as a black box — or whatever the font color is set to.

As for editing, any old vector editor should make removing layers pretty straightforward — Illustrator, Inkscape, etc.

Any luck?

@mchudnov
Copy link
Author

Hi Kai,

Sorry I hadn't gotten back to you I lef to go on vacation and it totally
slipped my mind.

YES! I had success and am now able to use the system with relative ease.
Thanks so much for ALL your help!

On Tue, Jan 14, 2014 at 5:56 AM, Kai Zau notifications@github.com wrote:

Colors aren't baked into fonts, which means a solid white layer would
actually appear as a black box — or whatever the font color is set to.

As for editing, any old vector editor should make removing layers pretty
straightforward — Illustrator, Inkscape, etc.

Any luck?


Reply to this email directly or view it on GitHubhttps://github.com//issues/159#issuecomment-32251487
.

Michael A. Chudnovsky
c: 902.452.2275e: michael.chudnovsky@gmail.com
michael.chudnovsky@gmail.com

@kaizau
Copy link
Member

kaizau commented Jan 14, 2014

You're absolutely welcome. Thanks for being patient and helping with debugging. Congrats on the wedding!

@kaizau kaizau closed this as completed Jan 14, 2014
@fotografi
Copy link

fotografi commented Aug 12, 2016

No description provided.

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

3 participants