fontParts
fontParts copied to clipboard
contour.copy().identifier
Contours are losing their identifiers when copied. The identifier needs to be copied here:
https://github.com/robotools/fontParts/blob/master/Lib/fontParts/base/contour.py#L39
(Or, perhaps identifier needs to be in the copyAttributes tuple.)
Test:
glyph = CurrentGlyph()
contour = glyph[0]
contour.getIdentifier()
print(contour.identifier)
copied = contour.copy()
print(copied.identifier)
This results in something like this:
T58Z1LQwm2
None
Correct me if I'm wrong, but shouldn't the new/copied contour have its own identifier, rather than the identifier of the old contour?
If the contour is appended to that glyph, then there would be 2 contours with the same identifier.