aboutsummaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAdrien Tétar2015-06-08 16:19:39 +0200
committerAdrien Tétar2015-06-08 16:19:39 +0200
commit5878b52e59eb50028c72ed2f142ef5425e10fce3 (patch)
treea2869d6ea1b1abc21c4c7180ddaf4514624758e0 /Lib
parent952cbd8a3aa3d2588fe9c83715ae424e84845c49 (diff)
downloadtrufont-5878b52e59eb50028c72ed2f142ef5425e10fce3.tar.bz2
OutlineInformationPen: reserve trailing offCurve for contour’s last point
Diffstat (limited to 'Lib')
-rw-r--r--Lib/defconQt/representationFactories/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/defconQt/representationFactories/__init__.py b/Lib/defconQt/representationFactories/__init__.py
index d3fbf77..74f5973 100644
--- a/Lib/defconQt/representationFactories/__init__.py
+++ b/Lib/defconQt/representationFactories/__init__.py
@@ -110,7 +110,10 @@ class OutlineInformationPen(AbstractPointPen):
if point["segmentType"] is not None:
prevCP, nextCP = None, None
if back["segmentType"] is None:
- prevCP = back["point"]
+ # if we have an open contour with a trailing offCurve, don't signal it to the
+ # first point
+ if not (not haveFirst and contour[pointIndex-2]["segmentType"] is not None):
+ prevCP = back["point"]
if forward["segmentType"] is None:
nextCP = forward["point"]
x, y = point["point"]