kateliev / TypeRig

Proxy API and Font Development Toolkit for FontLab
https://kateliev.github.io/TypeRig/
BSD 3-Clause "New" or "Revised" License
48 stars 3 forks source link

FL8: pGlyph.addComponents not working #86

Open minw0525 opened 8 months ago

minw0525 commented 8 months ago

https://github.com/kateliev/TypeRig/blob/85cf3dc59aa5ed7ec42cbd5501f7bbb332a68bae/Lib/typerig/proxy/fl/objects/glyph.py#L530

Traceback (most recent call last):
  File "<string>", line 24, in <module>
  File "C:\Users\LG\Desktop\TypeRig\Lib\typerig\proxy\fl\objects\glyph.py", line 533, in addComponents
    font = pFont(self.parent)
           ^^^^^
NameError: name 'pFont' is not defined. Did you mean: 'font'?

typerig.proxy.fl.objects.font package is not imported in the file, so pFont instance cannot be created.

minw0525 commented 8 months ago

When I executed the addComponent method after adding the import pfont statement, the following error occurred when executing the flLayer.setGlyphComponent method.

Traceback (most recent call last):
  File "<string>", line 61, in <module>
TypeError: argument type must be Int!

Other functions using the flLayer.setGlyphComponent API, such as pFont.newGlyphFromRecipe, also did not work.

flLayer.setGlyphComponent API works normally in fl7, but flLayer.setGlyphComponent seems to no longer work properly as the version goes up to fl8.