simoncozens / babelfont

Interrogate and manipulate UFO, TTF and OTF fonts with a common interface
Apache License 2.0
53 stars 9 forks source link

`OpenType._load_layers` overrides `TrueType._load_layers` but has fewer parameters #55

Closed dscorbett closed 6 months ago

dscorbett commented 7 months ago

Loading any OpenType font fails.

>>> from babelfont.convertors import Convert
>>> Convert('NotoSerif-Regular.otf').load()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "../../../../venv/lib/python3.11/site-packages/babelfont/convertors/__init__.py", line 88, in load
    return c.load(self, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "../../../../venv/lib/python3.11/site-packages/babelfont/convertors/__init__.py", line 39, in load
    return self._load()
           ^^^^^^^^^^^^
  File "../../../../venv/lib/python3.11/site-packages/babelfont/convertors/truetype.py", line 56, in _load
    self._load_glyphs()
  File "../../../../venv/lib/python3.11/site-packages/babelfont/convertors/truetype.py", line 140, in _load_glyphs
    glyphs_dict[glyph].layers = self._load_layers(glyph, glyphs_dict[glyph])
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: OpenType._load_layers() takes 2 positional arguments but 3 were given