Hi,
For some observers I need the decomposed, removeOverlaped glyph.
I have sort of a solution by adding duplicate glyphs to the font and decompose, removeOverlap them. And automatically remove them when the observer was removed.
But I know this can be done in a nicer way. But this code doesn’t do the trick. But way not? Seems okay to me…
f = CurrentFont()
g = f['H']
temp = g.copy()
temp.decompose()
temp.removeOverlap()
for c in temp.components:
print c #these must be gone...
drawGlyph(temp)
<Component for I>
<Component for I>
Traceback (most recent call last):
File "<untitled>", line 10, in <module>
File "main.py", line 29, in drawGlyph
File "lib/fontObjects/robofabWrapper.pyc", line 2736, in draw
File "/Applications/RoboFont_Beta.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 299, in draw
File "/Applications/RoboFont_Beta.app/Contents/Resources/lib/python2.7/defcon/objects/glyph.py", line 308, in drawPoints
File "/Applications/RoboFont_Beta.app/Contents/Resources/lib/python2.7/defcon/objects/component.py", line 107, in drawPoints
File "/Applications/RoboFont_Beta.app/Contents/Resources/lib/python2.7/robofab/pens/adapterPens.py", line 111, in addComponent
File "/Applications/RoboFont_Beta.app/Contents/Resources/lib/python2.7/fontTools/pens/basePen.py", line 166, in addComponent
TypeError: 'NoneType' object has no attribute '__getitem__'
Who can help?
Thanks! Thom