summaryrefslogtreecommitdiff
path: root/scripts/lib/fontbuild/mitreGlyph.py
diff options
context:
space:
mode:
authorJames Godfrey-Kittle <jamesgk@google.com>2015-02-20 10:17:27 -0800
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:30 -0700
commite8775eb72e7db4c0c13150334cdadba4aa1153ef (patch)
treeb1e2bc150df9933eba760af0281860ec12e86e87 /scripts/lib/fontbuild/mitreGlyph.py
parent368916db20d90de6713e84048c3bfa6cb5ad1228 (diff)
Make convertCurves RoboFab-compatible.
Another currently-unused but potentially useful module.
Diffstat (limited to 'scripts/lib/fontbuild/mitreGlyph.py')
-rw-r--r--scripts/lib/fontbuild/mitreGlyph.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/scripts/lib/fontbuild/mitreGlyph.py b/scripts/lib/fontbuild/mitreGlyph.py
index 6210c6b..0ee1448 100644
--- a/scripts/lib/fontbuild/mitreGlyph.py
+++ b/scripts/lib/fontbuild/mitreGlyph.py
@@ -8,6 +8,7 @@ maxAngle : Maximum angle in radians at which segments will be mitred. The defau
import math
from robofab.objects.objectsRF import RPoint, RSegment
+from fontbuild.convertCurves import replaceSegments
def getTangents(contours):
tmap = []
@@ -92,8 +93,4 @@ def mitreGlyph(g,mitreSize,maxAngle):
else:
segments.append(s1)
if needsMitring:
- while len(c):
- c.removeSegment(0)
- for s in segments:
- c.appendSegment(
- s.type, [(p.x, p.y) for p in s.points], s.smooth)
+ replaceSegments(c, segments)