typemytype / outlinerRoboFontExtension

Outlines strokes
6 stars 6 forks source link

Traceback with preserveBounds #9

Open ryanbugden opened 8 months ago

ryanbugden commented 8 months ago
Traceback (most recent call last):
  File "lib/doodleDelegate.pyc", line 88, in sendEvent_
  File "/Applications/RoboFont-4_5b2.app/Contents/Resources/lib/python3.9/vanilla/vanillaBase.py", line 539, in action_
  File "outline.py", line 343, in outlineButtonCallback
  File "outline.py", line 57, in calculate
  File "/Applications/RoboFont-4_5b2.app/Contents/Resources/lib/python3.9/defcon/objects/glyph.py", line 267, in _get_bounds
  File "/Applications/RoboFont-4_5b2.app/Contents/Resources/lib/python3.9/defcon/objects/glyph.py", line 258, in _getContourComponentBounds
  File "/Applications/RoboFont-4_5b2.app/Contents/Resources/lib/python3.9/defcon/objects/component.py", line 124, in _get_bounds
  File "/Applications/RoboFont-4_5b2.app/Contents/Resources/lib/python3.9/defcon/objects/base.py", line 342, in getRepresentation
  File "/Applications/RoboFont-4_5b2.app/Contents/Resources/lib/python3.9/defcon/tools/representations.py", line 92, in componentBoundsRepresentationFactory
  File "/Applications/RoboFont-4_5b2.app/Contents/Resources/lib/python3.9/defcon/objects/component.py", line 176, in draw
  File "/Applications/RoboFont-4_5b2.app/Contents/Resources/lib/python3.9/defcon/objects/component.py", line 185, in drawPoints
  File "/Applications/RoboFont-4_5b2.app/Contents/Resources/lib/python3.9/fontTools/pens/pointPen.py", line 264, in addComponent
  File "/Applications/RoboFont-4_5b2.app/Contents/Resources/lib/python3.9/fontTools/pens/basePen.py", line 217, in addComponent
TypeError: 'NoneType' object is not subscriptable

Using these settings:

image
typemytype commented 8 months ago

should be fixed!!

typemytype commented 8 months ago

(as a reminder)

when generating with preserve bounds and preserve components on the generated outlined glyph with components has no bounds... has it has no parent layer...

solution is to calculate the bounds of the original glyph and add the thickness + contrast angle