loicsander / Robofont-scripts

MIT License
68 stars 28 forks source link

space (zero contour glyphs?) in txtInput with groups goes wrong #13

Closed thomgb closed 9 years ago

thomgb commented 9 years ago

Did some tests. But the initial filters, Flatten & Spike in a group, using spaces in txtInput goes good!

But if I use some of mine the following error pops up. Are my filters wrong? Please tell me :)

Traceback (most recent call last):
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaList.py", line 58, in observeValueForKeyPath_ofObject_change_context_
    self._targetMethod()
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaList.py", line 732, in _selection
    self._selectionCallback(self)
  File "penBallWizard.py", line 448, in filterSelectionChanged
  File "penBallWizard.py", line 147, in updatePreview
  File "penBallWizard.py", line 125, in processGlyphs
  File "penBallWizard.py", line 142, in filterGlyphs
  File "lib/fontObjects/robofabWrapper.pyc", line 3385, in insertGlyph
  File "lib/fontObjects/doodleFont.pyc", line 383, in insertGlyph
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/font.py", line 266, in insertGlyph
    dest.unicodes = list(source.unicodes)
TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "lib/doodleDelegate.pyc", line 157, in sendEvent_
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaList.py", line 58, in observeValueForKeyPath_ofObject_change_context_
    self._targetMethod()
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/vanilla/vanillaList.py", line 732, in _selection
    self._selectionCallback(self)
  File "penBallWizard.py", line 448, in filterSelectionChanged
  File "penBallWizard.py", line 147, in updatePreview
  File "penBallWizard.py", line 125, in processGlyphs
  File "penBallWizard.py", line 142, in filterGlyphs
  File "lib/fontObjects/robofabWrapper.pyc", line 3385, in insertGlyph
  File "lib/fontObjects/doodleFont.pyc", line 383, in insertGlyph
  File "/Applications/RoboFont.app/Contents/Resources/lib/python2.7/defcon/objects/font.py", line 266, in insertGlyph
    dest.unicodes = list(source.unicodes)
TypeError: 'NoneType' object is not iterable
loicsander commented 9 years ago

Should be solved in the last version as well, I’ll wait until you confirm before closing this.

thomgb commented 9 years ago

Nope. Still errors. :( I start to think its in the UFO... (is that even possible?) I have all the same errors on Yosemite and Snow Leopard (old RF), on both 3,06 GHz Intel Core 2 Duo and 2,66 GHz Intel Core i7.

I'll do some test with fresh UFOs... Did some test. Same errors...

:(

loicsander commented 9 years ago

This one defeats me, I don’t quite see what’s happening there. From what I understand, the unicodes attributes (which is supposed to be a list) has a None value, but I have no idea how and why. Does it happen with specific glyphs only?

thomgb commented 9 years ago

It happens to zero contour glyphs, if there is a mode set in the operation. But now there are no errors, only the lowercase-x-with-white-capital-N-within shows :) And this glyph is also generated. I believe it should be a empty glyph with the right with... :)

loicsander commented 9 years ago

Yes I’ve added those error glyphs to try and show what’s happening wrong, the x with a N means that somewhere in the process, a glyph was null, which can happen with some booleanOperations from what I tested. I prefer to have a visual feedback of the error than an empty glyph, but it’s a matter of preference, I can make this an option.