fontParts icon indicating copy to clipboard operation
fontParts copied to clipboard

contour.copy().identifier

Open typesupply opened this issue 5 years ago • 1 comments

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

typesupply avatar Jan 16 '20 16:01 typesupply

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.

colinmford avatar Apr 08 '20 20:04 colinmford