diff --git a/Lib/fontTools/misc/psCharStrings.py b/Lib/fontTools/misc/psCharStrings.py index c2fbd62fc..1fa597cbc 100644 --- a/Lib/fontTools/misc/psCharStrings.py +++ b/Lib/fontTools/misc/psCharStrings.py @@ -400,6 +400,11 @@ class T2OutlineExtractor(SimpleT2Decompiler): def appendPoint(self, point, isPrimary): import Numeric point = self.currentPoint + Numeric.array(point, Numeric.Int16) + if not self.contours: + # The glyph doesn't start with a moveto. Not sure whether + # this is legal, but apparently it usually works. + self.newPath() + self.appendPoint(self.currentPoint, 1) self.currentPoint = point points, flags, isClosed = self.contours[-1] points.append(point)