From 7580fc7e240b14e1743e750da81721d6098385b3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 22 Feb 2023 07:44:13 -0700 Subject: [PATCH] [cu2quPen] Remove unnecessary check --- Lib/fontTools/pens/cu2quPen.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Lib/fontTools/pens/cu2quPen.py b/Lib/fontTools/pens/cu2quPen.py index e9e571c1b..f182aed44 100644 --- a/Lib/fontTools/pens/cu2quPen.py +++ b/Lib/fontTools/pens/cu2quPen.py @@ -194,14 +194,13 @@ class Cu2QuPointPen(BasePointToSegmentPen): f"expected {n}, got {len(points)}" ) offcurves = points[:-1] - if offcurves: - if i == 0: - # any off-curve points preceding the first on-curve - # will be appended at the end of the contour - last_offcurves = offcurves - else: - for (pt, smooth, name, kwargs) in offcurves: - pen.addPoint(pt, None, smooth, name, **kwargs) + if i == 0: + # any off-curve points preceding the first on-curve + # will be appended at the end of the contour + last_offcurves = offcurves + else: + for (pt, smooth, name, kwargs) in offcurves: + pen.addPoint(pt, None, smooth, name, **kwargs) pt, smooth, name, kwargs = points[-1] if pt is None: assert segment_type == "qcurve"