12 Commits

Author SHA1 Message Date
Cosimo Lupo
faedfacbae [reverseContourPen_test] fix expected result for ReverseContourPointPen
This test is not normally run. It is skipped when ufoLib is not importable,
as it's the case from the test runner's virtual environment.

The only reason it exists is so that I could check that the
ReverseContourPen I was writing behaves the same as using ufoLib's
ReverseContourPointPen when the latter is run through the
SegmentToPointPen and PointToSegmentPen converters.

The two methods for reversing contours now diverge since
https://github.com/fonttools/fonttools/pull/1080,
but only nominally because both produce effectively the same results.
The only difference is that, when using the point pens with
outputImpliedClosingLine=True, the closing lineTo is always there even
when it's redundant. In our implmentation, we only output the closing
lineTo when it is the same as moveTo (this was necessary in order to
fix https://github.com/googlei18n/cu2qu/issues/51)
Nevertheless, the total number of points is the same in both cases.

Maybe this test should not be here, as it's testing functionalities
from a different package.

Closes https://github.com/fonttools/fonttools/issues/1081
2017-10-25 11:18:35 +01:00
Cosimo Lupo
1ef034c385 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.
2017-10-24 19:20:44 +01:00
Cosimo Lupo
0a22639ed3 [reverseContourPen_test] add test case from cu2qu#51
https://github.com/googlei18n/cu2qu/issues/51#issue-179370514a
2017-10-24 19:04:38 +01:00
Cosimo Lupo
d316ebebbb [reverseContourPen_test] keep duplicate point in expected result 2017-10-24 18:14:22 +01:00
Cosimo Lupo
3bbba21f1f [reverseContourPen_test] unit tests for ReverseContourPen
For comparison, I also include tests for the ufoLib pen.
They are skipped if ufoLib is not importable.
2017-10-11 21:13:23 +01:00
Miguel Sousa
2d02c54d1a [t2CharStringPen_test] Update test results 2017-05-06 00:11:27 -07:00
Cosimo Lupo
0690634eb1
[t2CharStringPen_test] add test for horizontal _relativeMoveTo (hmoveto) 2017-04-28 15:36:42 +01:00
Miguel Sousa
86b820ad0d [t2CharStringPen] Update tests 2017-04-28 03:27:42 -07:00
Cosimo Lupo
3e70daa206
[basePen_test] add test for missing component skipped 2017-04-13 14:22:40 +01:00
Cosimo Lupo
78212239aa
[recordingPen_test] test recording component references as well as decomposed paths 2017-04-13 14:22:40 +01:00
Cosimo Lupo
3cdc800873
[Tests] rename all 'testdata' folders to simply 'data'
as it's now obvious what kind of data they are
2017-01-17 13:33:46 +00:00
Cosimo Lupo
78ad48eaf3
Move all *_test.py modules and test data to external Tests/ folder 2017-01-16 09:14:12 +00:00