Hi
I have some glyphs that has paths and components and I want to get only the components but decomposed to perform some other things in a script.
But when I try to make a copy, delete the “real” paths, and decompose the comps to get paths I get nothing. What I’m doing wrong here? Thanks in advance
font = Glyphs.font
for thisLayer in font.selectedLayers:
# make copy
copyOfLayer = thisLayer.copy()
# Remove paths from copy
for i in range( len( copyOfLayer.paths ))[::-1]:
del copyOfLayer.paths[i]
print copyOfLayer.paths
# Decompose components
copyOfLayer.decomposeComponents()
print copyOfLayer.paths