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

building from source broken #20

Closed
shinenelson opened this issue Aug 31, 2017 · 6 comments
Closed

building from source broken #20

shinenelson opened this issue Aug 31, 2017 · 6 comments

Comments

@shinenelson
Copy link
Contributor

the build.sh script has multiple issues while building on a Linux machine.

  1. fontmake cannot autohint (tested with both python3.5 and python2.7).
Traceback (most recent call last):
  File "/home/shine/dev/git/mozilla/fonts/zilla-slab/env/3.5/bin/fontmake", line 11, in <module>
    sys.exit(main())
  File "/home/shine/dev/git/mozilla/fonts/zilla-slab/env/3.5/lib/python3.5/site-packages/fontmake/__main__.py", line 195, in main
    ufo_paths, is_instance=args.pop('masters_as_instances'), **args)
  File "/home/shine/dev/git/mozilla/fonts/zilla-slab/env/3.5/lib/python3.5/site-packages/fontmake/font_project.py", line 481, in run_from_ufos
    **kwargs)
  File "/home/shine/dev/git/mozilla/fonts/zilla-slab/env/3.5/lib/python3.5/site-packages/fontmake/font_project.py", line 193, in build_ttfs
    self.save_otfs(ufos, ttf=True, **kwargs)
  File "/home/shine/dev/git/mozilla/fonts/zilla-slab/env/3.5/lib/python3.5/site-packages/fontTools/misc/loggingTools.py", line 372, in wrapper
    return func(*args, **kwds)
  File "/home/shine/dev/git/mozilla/fonts/zilla-slab/env/3.5/lib/python3.5/site-packages/fontmake/font_project.py", line 320, in save_otfs
    ttfautohint(otf_path, hinted_otf_path, args=autohint)
  File "/home/shine/dev/git/mozilla/fonts/zilla-slab/env/3.5/lib/python3.5/site-packages/fontmake/ttfautohint.py", line 32, in ttfautohint
    return subprocess.call(arg_list + args.split() + file_args)
  File "/usr/lib/python3.5/subprocess.py", line 557, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'ttfautohint'

I managed to build the fonts without autohint.

  1. sfnt2woff and woff2_compress are dependencies that are not mentioned in the requirements.txt. Neither are the steps to install the dependencies are not mentioned in the README.md file.
    I had to install the woff-tools package to get the sfnt2woff command working. I also compiled the woff2 library from source to get the woff2_compress command working.

But these are tech-y stuff that a normal user cannot comprehend.

  • We should look at why fontmake can't autohint. If it is an upstream issue, we should remove the -a flag from the fontmake command so that the script doesn't break.
  • If we're going to support WOFF/WOFF2, we should let users know how to get the dependencies installed, in the README.md file.
@alexgibson
Copy link
Member

alexgibson commented Oct 19, 2017

I hit this when installing on OSX too in #5 (comment)

The simplest fix was to run brew install ttfautohint. We should probably add this to the docs. As for building without autohint, I'm not sure if this is something we'd want to do. Any thoughts @m4rc1e?

Also, I don't think I would expect most users to want to build the fonts from source. Most will simply download the compiled zip.

@alexgibson
Copy link
Member

I also see you opened #22 to update the readme, but accepting that change seems dependent on the answer to the comment above.

@shinenelson
Copy link
Contributor Author

We should probably add this to the docs.

Agreed. Should I add another line mentioning this dependency on the README.md in pull #22 ?

As for building without autohint, I'm not sure if this is something we'd want to do.

I'm not in favor of that either. I was just indicating a temporary workaround until fontmake could put in a proper fix or a proper exception rather than like a fatal, un-handled exception stack-trace; like @m4rc1e mentioned in #5 (comment).

Also, I don't think I would expect most users to want to build the fonts from source. Most will simply download the compiled zip.

There are a few developers / enthusiasts (like me) who love building / compiling everything from source. I speak for their sake. Also, the instructions are for building from source right? The download instructions are provided in the Download section in the beginning of the README.md file right?

I also see you opened #22 to update the readme, but accepting that change seems dependent on the answer to the comment above.

I think both #21 and #22 are independent of the autohint issue. I deliberately did not include them since I wanted to put that up for discussion before making any changes. I think both of them can be merged even if we don't come to a consensus / decision about what to do about autohint.

@alexgibson
Copy link
Member

alexgibson commented Oct 22, 2017

Ok - things I think we can do to close this issue:

  1. Yes please, add brew install ttautohint to the install instructions. This should fix the primary issue reported here.
  2. Yes I think we can merge Update readme with information on installing dependencies on Linux #22 to cover Linux once it’s reviewed (many thanks there).
  3. The readme does already mention both sfnt2woff and woff2 as dependencies, despite you saying they are not mentioned. Perhaps this is not clear enough, in which case we can try and explain things better. We can look at this in your PR.

@shinenelson
Copy link
Contributor Author

Done. Can you take a look at #22 now @alexgibson?

@alexgibson
Copy link
Member

Done, thanks @shinenelson

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

2 participants