@@ -40,30 +40,18 @@ def _getAngled(self, pt):
40
40
def _moveTo (self , pt ):
41
41
self ._start = self .currentPoint = pt
42
42
43
- def _addMoveTo (self ):
44
- if self ._start is None :
45
- return
46
- self ._start = self .currentPoint = None
47
-
48
43
def _lineTo (self , pt ):
49
- self ._addMoveTo ()
50
44
self ._getAngled (pt )
51
45
self .currentPoint = pt
52
46
53
47
def _curveToOne (self , pt1 , pt2 , pt3 ):
54
- self ._addMoveTo ()
55
48
step = 1.0 / self .maxSteps
56
49
factors = range (0 , self .maxSteps + 1 )
57
50
for i in factors :
58
51
pt = getCubicPoint (i * step , self .currentPoint , pt1 , pt2 , pt3 )
59
52
self ._getAngled (pt )
60
53
self .currentPoint = pt3
61
54
62
- def _qCurveToOne (self , bcp , pt ):
63
- self ._addMoveTo ()
64
- self ._getAngled (pt )
65
- self .currentPoint = pt
66
-
67
55
68
56
def getAngledMargins (glyph , font ):
69
57
"""
@@ -79,7 +67,7 @@ def setAngledLeftMargin(glyph, font, value):
79
67
Convenience function, sets the left angled margin to value. Adjusted for font.info.italicAngle.
80
68
"""
81
69
pen = AngledMarginPen (font , glyph .width , font .info .italicAngle )
82
- g .draw (pen )
70
+ glyph .draw (pen )
83
71
isLeft , isRight = pen .margin
84
72
glyph .leftMargin += value - isLeft
85
73
@@ -89,7 +77,7 @@ def setAngledRightMargin(glyph, font, value):
89
77
Convenience function, sets the right angled margin to value. Adjusted for font.info.italicAngle.
90
78
"""
91
79
pen = AngledMarginPen (font , glyph .width , font .info .italicAngle )
92
- g .draw (pen )
80
+ glyph .draw (pen )
93
81
isLeft , isRight = pen .margin
94
82
glyph .rightMargin += value - isRight
95
83
@@ -99,7 +87,7 @@ def centerAngledMargins(glyph, font):
99
87
Convenience function, centers the glyph on angled margins.
100
88
"""
101
89
pen = AngledMarginPen (font , glyph .width , font .info .italicAngle )
102
- g .draw (pen )
90
+ glyph .draw (pen )
103
91
isLeft , isRight = pen .margin
104
92
setAngledLeftMargin (glyph , font , (isLeft + isRight ) * .5 )
105
93
setAngledRightMargin (glyph , font , (isLeft + isRight ) * .5 )
0 commit comments