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

Hints: handle up and down targets #376

Open
madig opened this issue Jun 19, 2018 · 0 comments
Open

Hints: handle up and down targets #376

madig opened this issue Jun 19, 2018 · 0 comments

Comments

@madig
Copy link
Collaborator

madig commented Jun 19, 2018

It's apparently easy to accidentally add hints. One glyph contained in its lib field:

{'com.schriftgestaltung.Glyphs.glyph.rightMetricsKey': '=|', 
'com.schriftgestaltung.hints': [{'horizontal': True, 'options': 0, 'origin': [0, 2], 'stem': -2, 'target': ['d', 'o', 'w', 'n'], 'type': 'TopGhost'}], 
'public.markColor': '0.04,0.57,0.04,1'}

glyphsLib output:

Traceback (most recent call last):
  ...
  File "/Users/.../venv/lib/python3.6/site-packages/glyphsLib/builder/__init__.py", line 115, in to_glyphs
    return builder.font
  File "/Users/.../venv/lib/python3.6/site-packages/glyphsLib/builder/builders.py", line 343, in font
    self.to_glyphs_glyph(glyph, layer, master)
  File "/Users/.../venv/lib/python3.6/site-packages/glyphsLib/builder/glyph.py", line 216, in to_glyphs_glyph
    self.to_glyphs_hints(ufo_glyph, layer)
  File "/Users/.../venv/lib/python3.6/site-packages/glyphsLib/builder/hints.py", line 57, in to_glyphs_hints
    value = Point(*hint[attr])
TypeError: __init__() takes from 1 to 4 positional arguments but 5 were given

https://github.com/googlei18n/glyphsLib/blob/b35f4abe16df4d49f687833dbf841b9d7b0ec281/Lib/glyphsLib/builder/hints.py#L55

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

1 participant