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.
This commit is contained in:
Cosimo Lupo 2017-10-31 18:21:20 +00:00
parent 3125f071c7
commit 09c5856428

View File

@ -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)