-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0b7bc2
commit 283e704
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from ufo2ft.filters.addExtrema import AddExtremaFilter | ||
|
||
|
||
class AddExtremaFilterTest: | ||
def test_add_extrema_O(self, FontClass): | ||
ufo = FontClass() | ||
a = ufo.newGlyph("O") | ||
a.width = 300 | ||
pen = a.getPen() | ||
pen.moveTo((150, 0)) | ||
pen.curveTo((249, 0), (249, 150), (150, 150)) | ||
pen.curveTo((52, 150), (52, 0), (150, 0)) | ||
pen.closePath() | ||
|
||
contour = ufo["O"][0] | ||
assert len(contour) == 6 | ||
|
||
filter_ = AddExtremaFilter() | ||
|
||
assert filter_(ufo) | ||
|
||
contour = ufo["O"][0] | ||
assert len(contour) == 12 | ||
ufo.save("t.ufo") |