Merge pull request #101 from anthrotype/reverse-pen

use ReverseContourPen from fonttools
This commit is contained in:
Cosimo Lupo 2017-10-30 19:02:04 +00:00 committed by GitHub
commit e1d072582a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 12 deletions

View File

@ -1,6 +1,7 @@
from __future__ import print_function, division, absolute_import
from cu2qu import curve_to_quadratic
from fontTools.pens.basePen import AbstractPen, decomposeSuperBezierSegment
from fontTools.pens.reverseContourPen import ReverseContourPen
try:
from ufoLib.pointPen import AbstractPointPen, BasePointToSegmentPen
@ -227,12 +228,3 @@ class Cu2QuPointPen(BasePointToSegmentPen):
def addComponent(self, baseGlyphName, transformation):
assert self.currentPath is None
self.pen.addComponent(baseGlyphName, transformation)
class ReverseContourPen(SegmentToPointPen):
""" Same as 'ReverseContourPointPen' but using the SegmentPen protocol. """
def __init__(self, other_pen):
adapter_point_pen = PointToSegmentPen(other_pen)
reverse_point_pen = ReverseContourPointPen(adapter_point_pen)
SegmentToPointPen.__init__(self, reverse_point_pen)

View File

@ -1,2 +1,2 @@
fonttools==3.17.0
fonttools==3.18.0
ufoLib==2.1.1

View File

@ -172,8 +172,8 @@ setup(
'pytest>=2.8',
],
install_requires=[
"fonttools>=3.1.2",
"ufoLib>=2.1.0",
"fonttools>=3.18.0",
"ufoLib>=2.1.1",
],
cmdclass={
"release": release,