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

Cannot make Breite-Light #12

Closed
brawer opened this issue Feb 11, 2016 · 6 comments
Closed

Cannot make Breite-Light #12

brawer opened this issue Feb 11, 2016 · 6 comments

Comments

@brawer
Copy link
Contributor

brawer commented Feb 11, 2016

fontmake crashes when building Breite-Light from UFO:

$ git clone https://github.com/metapolator/Breite.git
$ fontmake -u Breite/Breite\ Light/Light.ufo
Traceback (most recent call last):
  File "/usr/local/bin/fontmake", line 9, in <module>
    load_entry_point('fontmake', 'console_scripts', 'fontmake')()
  File "/home/sascha/src/fontmake/Lib/fontmake/__main__.py", line 47, in main
    project.run_from_ufos(ufo_paths, **args)
  File "/home/sascha/src/fontmake/Lib/fontmake/font_project.py", line 158, in run_from_ufos
    print '>> Removing overlaps for ' + ufo.info.postscriptFullName
TypeError: cannot concatenate 'str' and 'NoneType' objects

First I thought it’s the whitespace in the file names, but renaming directories did not help. Is the font borked? Or an upstream component?

@adrientetar
Copy link
Contributor

The font is fine I guess, it just doesn't have a postscriptFullName defined and so that is None.

@adrientetar
Copy link
Contributor

In ufo2ft/ufo2fdk there is getFontAttrWithFallback which mostly requires familyName and styleName in terms of naming. Note that a UFO without these attributes is still a valid UFO, but it's reasonable to require familyName and styleName for font generation (we require attributes which ufo2ft will crash without there).

@brawer
Copy link
Contributor Author

brawer commented Feb 11, 2016

Thanks for the explanation. If the input lacks a needed attribute, could fontmake print an error message instead of crashing?

@adrientetar
Copy link
Contributor

I'd raise an exception anyway since it failed to proceed, so caller can react accordingly. Maybe ValueError, that's what ufo2ft raised when it was using makeotf.

Now, postscriptFullName itself shouldn't be a hard requirement. I would suggest calling getFontAttrWithFallback or falling back to familyName + styleName.

@jamesgk
Copy link
Contributor

jamesgk commented Feb 12, 2016

As of afe78eb it's now just building a postscript-like name, since this was only used for printing. Breite-Light is still crashing for me, but I believe that's an issue with the UFO (missing or mis-referencing a component).

@brawer
Copy link
Contributor Author

brawer commented Feb 16, 2016

Thanks for fixing postscriptFullName. Created a new bug for the discussion how to handle missing components.

@brawer brawer closed this as completed Feb 16, 2016
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