[ttGlyphPen] check last point in qCurveTo is not None

otherwise, if points[-1] == 0, the on-curve point won't be added.
This commit is contained in:
Cosimo Lupo 2016-03-09 17:57:10 +00:00
parent c3e2d37299
commit 87d13888ce

View File

@ -47,11 +47,12 @@ class TTGlyphPen(AbstractPen):
self._addPoint(pt, 1)
def qCurveTo(self, *points):
assert len(points) >= 1
for pt in points[:-1]:
self._addPoint(pt, 0)
# last point is None if there are no on-curve points
if points[-1]:
if points[-1] is not None:
self._addPoint(points[-1], 1)
def closePath(self):