use outputImpliedClosingLine=True with ReverseContourPointPen

One way to work around https://github.com/googlei18n/cu2qu/issues/51
when using the ufoLib's ReverseConturPointPen via the converter pens
would be to pass the outputImpliedClosingLine=True argument
(False by default) to the PointToSegmentPen.

This way, all the final lineTos are explicitly outputted, even when
they are redundant and could be implied (i.e. when they are not
duplicate points).

Note that this test is skipped by the CI, because ufoLib is not a
dependency of fonttools; you can run locally if you wish.
This commit is contained in:
Cosimo Lupo 2017-10-24 19:20:44 +01:00
parent e201ea9891
commit 1ef034c385

View File

@ -300,7 +300,7 @@ def test_reverse_point_pen(contour, expected):
pytest.skip("ufoLib not installed")
recpen = RecordingPen()
pt2seg = PointToSegmentPen(recpen)
pt2seg = PointToSegmentPen(recpen, outputImpliedClosingLine=True)
revpen = ReverseContourPointPen(pt2seg)
seg2pt = SegmentToPointPen(revpen)
for operator, operands in contour: