From 09c585642820a9de43ca4fdc717c2baf3040b55a Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Tue, 31 Oct 2017 18:21:20 +0000 Subject: [PATCH] ufo: don't drop single points in GetSegmentsPen We dropped robofab support. There is no reason to arbitrarily drop any contour points. Anchors are handled as anchors in latest ufoLib+defcon, also for UFO2. No more need to special-case. --- Lib/cu2qu/ufo.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Lib/cu2qu/ufo.py b/Lib/cu2qu/ufo.py index 73de18964..bb70e7f14 100644 --- a/Lib/cu2qu/ufo.py +++ b/Lib/cu2qu/ufo.py @@ -77,12 +77,7 @@ class GetSegmentsPen(AbstractPen): def _add_segment(self, tag, *args): if tag in ['move', 'line', 'qcurve', 'curve']: self._last_pt = args[-1] - - # don't collect ufo2-style anchors - if tag in ['close', 'end'] and self.segments[-1][0] == 'move': - self.segments.pop() - else: - self.segments.append((tag, args)) + self.segments.append((tag, args)) def moveTo(self, pt): self._add_segment('move', pt)