L i &ddlmZGddeZy))ContourFilterPenceZdZdZdZy)ExplicitClosingLinePena A filter pen that adds an explicit lineTo to the first point of each closed contour if the end point of the last segment is not already the same as the first point. Otherwise, it passes the contour through unchanged. >>> from pprint import pprint >>> from fontTools.pens.recordingPen import RecordingPen >>> rec = RecordingPen() >>> pen = ExplicitClosingLinePen(rec) >>> pen.moveTo((0, 0)) >>> pen.lineTo((100, 0)) >>> pen.lineTo((100, 100)) >>> pen.closePath() >>> pprint(rec.value) [('moveTo', ((0, 0),)), ('lineTo', ((100, 0),)), ('lineTo', ((100, 100),)), ('lineTo', ((0, 0),)), ('closePath', ())] >>> rec = RecordingPen() >>> pen = ExplicitClosingLinePen(rec) >>> pen.moveTo((0, 0)) >>> pen.lineTo((100, 0)) >>> pen.lineTo((100, 100)) >>> pen.lineTo((0, 0)) >>> pen.closePath() >>> pprint(rec.value) [('moveTo', ((0, 0),)), ('lineTo', ((100, 0),)), ('lineTo', ((100, 100),)), ('lineTo', ((0, 0),)), ('closePath', ())] >>> rec = RecordingPen() >>> pen = ExplicitClosingLinePen(rec) >>> pen.moveTo((0, 0)) >>> pen.curveTo((100, 0), (0, 100), (100, 100)) >>> pen.closePath() >>> pprint(rec.value) [('moveTo', ((0, 0),)), ('curveTo', ((100, 0), (0, 100), (100, 100))), ('lineTo', ((0, 0),)), ('closePath', ())] >>> rec = RecordingPen() >>> pen = ExplicitClosingLinePen(rec) >>> pen.moveTo((0, 0)) >>> pen.curveTo((100, 0), (0, 100), (100, 100)) >>> pen.lineTo((0, 0)) >>> pen.closePath() >>> pprint(rec.value) [('moveTo', ((0, 0),)), ('curveTo', ((100, 0), (0, 100), (100, 100))), ('lineTo', ((0, 0),)), ('closePath', ())] >>> rec = RecordingPen() >>> pen = ExplicitClosingLinePen(rec) >>> pen.moveTo((0, 0)) >>> pen.curveTo((100, 0), (0, 100), (0, 0)) >>> pen.closePath() >>> pprint(rec.value) [('moveTo', ((0, 0),)), ('curveTo', ((100, 0), (0, 100), (0, 0))), ('closePath', ())] >>> rec = RecordingPen() >>> pen = ExplicitClosingLinePen(rec) >>> pen.moveTo((0, 0)) >>> pen.closePath() >>> pprint(rec.value) [('moveTo', ((0, 0),)), ('closePath', ())] >>> rec = RecordingPen() >>> pen = ExplicitClosingLinePen(rec) >>> pen.closePath() >>> pprint(rec.value) [('closePath', ())] >>> rec = RecordingPen() >>> pen = ExplicitClosingLinePen(rec) >>> pen.moveTo((0, 0)) >>> pen.lineTo((100, 0)) >>> pen.lineTo((100, 100)) >>> pen.endPath() >>> pprint(rec.value) [('moveTo', ((0, 0),)), ('lineTo', ((100, 0),)), ('lineTo', ((100, 100),)), ('endPath', ())] c|r$|dddk7s|dddk7st|dkry|ddd}|dd}|r||dk7r d|ffd g|ddyyy) NrmoveTo closePathlineTo)r )len)selfcontourmovePtlastSegs k/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/fontTools/pens/explicitClosingLinePen.py filterContourz$ExplicitClosingLinePen.filterContourZsqz!}(r{1~,7|a Aq!"+a. v,%y13DEGBCL-7N)__name__ __module__ __qualname____doc__rrrrrrsSj FrrN)fontTools.pens.filterPenrrrrrrs5aF-aFr