From 7d36bf42ef91af7ca5e69650ccb59455b468dc74 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 22 Feb 2017 10:33:57 -0600 Subject: [PATCH] [interpolatable] Don't pass glyphset to subpen in PerContourPen It doesn't need it. We just record the component. --- Snippets/interpolatable.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Snippets/interpolatable.py b/Snippets/interpolatable.py index b66329f70..d0b288fa1 100755 --- a/Snippets/interpolatable.py +++ b/Snippets/interpolatable.py @@ -38,7 +38,7 @@ class PerContourPen(BasePen): self._pen = None def _newItem(self): - self._pen = pen = self._Pen(glyphset=self._glyphset) + self._pen = pen = self._Pen() self.value.append(pen) class PerContourOrComponentPen(PerContourPen): @@ -110,8 +110,7 @@ def test(glyphsets, glyphs=None, names=None): #print('.', end='') glyph = glyphset[glyph_name] - penClass = lambda glyphset: RecordingPen() - perContourPen = PerContourOrComponentPen(penClass, glyphset=glyphset) + perContourPen = PerContourOrComponentPen(RecordingPen, glyphset=glyphset) glyph.draw(perContourPen) contourPens = perContourPen.value del perContourPen