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

"Must have exactly one ligature lookup" error #7

Open
davelab6 opened this issue Apr 30, 2021 · 2 comments
Open

"Must have exactly one ligature lookup" error #7

davelab6 opened this issue Apr 30, 2021 · 2 comments

Comments

@davelab6
Copy link
Member

Fails on https://github.com/Ancymonic/Signika/tree/master/fonts/signikavf

$ vf2symbols Signika\[NEGA,wght\].ttf 
I0430 13:23:47.745712 4575391232 vf2symbols.py:158] Generating build/build.ninja
Traceback (most recent call last):
  File "/Users/dcrossland/Library/Python/3.9/bin/vf2symbols", line 33, in <module>
    sys.exit(load_entry_point('vf2symbols', 'console_scripts', 'vf2symbols')())
  File "/Users/dcrossland/src/github.com/googlefonts/vf2symbols/src/vf2symbols/vf2symbols.py", line 175, in main
    app.run(_run)
  File "/Users/dcrossland/Library/Python/3.9/lib/python/site-packages/absl/app.py", line 303, in run
    _run_main(main, args)
  File "/Users/dcrossland/Library/Python/3.9/lib/python/site-packages/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "/Users/dcrossland/src/github.com/googlefonts/vf2symbols/src/vf2symbols/vf2symbols.py", line 163, in _run
    _write_vf_symbol_builds(nw, root_font, font_files)
  File "/Users/dcrossland/src/github.com/googlefonts/vf2symbols/src/vf2symbols/vf2symbols.py", line 137, in _write_vf_symbol_builds
    for icon_name in icon_font.extract_icon_names(
  File "/Users/dcrossland/src/github.com/googlefonts/vf2symbols/src/vf2symbols/icon_font.py", line 61, in extract_icon_names
    for first_glyph_name, ligatures in _ligature_roots(ttfont).items():
  File "/Users/dcrossland/src/github.com/googlefonts/vf2symbols/src/vf2symbols/icon_font.py", line 41, in _ligature_roots
    assert len(lookups) == 1, "Must have exactly one ligature lookup"
AssertionError: Must have exactly one ligature lookup
$
@rsheeter
Copy link
Collaborator

This particular limitation is purely me being lazy (the font I was testing with had one lookup and I was in a hurry) but in general beware that this tool currently assumes the conventions of what I'll call a Google-style icon font.

Was the idea to generate SF Symbols for some of the icon shapes from Signika?

@rsheeter
Copy link
Collaborator

It may make sense to approach slightly differently: write a script to make Signika "look like" a Google style icon font and then tools like this will Just Work

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