summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Godfrey-Kittle <jamesgk@google.com>2015-03-09 13:17:13 -0700
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:32 -0700
commitec6ee74a46e7f8cfb62e3d108bbbacb53fefec46 (patch)
treee760337babdab8d09973ac44b9181ced280c4ace
parent55dccaf63fbbc6ebf2dfc0a6681ce43c841f6f05 (diff)
Move removeGlyphOverlap to main build script.
Another small function which probably does not warrant a separate module.
-rw-r--r--scripts/lib/fontbuild/Build.py11
-rw-r--r--scripts/lib/fontbuild/removeGlyphOverlap.py10
2 files changed, 10 insertions, 11 deletions
diff --git a/scripts/lib/fontbuild/Build.py b/scripts/lib/fontbuild/Build.py
index b02ae8b..fcdb3c1 100644
--- a/scripts/lib/fontbuild/Build.py
+++ b/scripts/lib/fontbuild/Build.py
@@ -1,3 +1,4 @@
+from booleanOperations import BooleanOperationManager
from robofab.world import OpenFont
from fontbuild.mix import Mix,Master,narrowFLGlyph
from fontbuild.instanceNames import setNamesRF
@@ -10,7 +11,6 @@ from fontbuild.features import readFeatureFile, writeFeatureFile
from fontbuild.markFeature import GenerateFeature_mark
from fontbuild.mkmkFeature import GenerateFeature_mkmk
from fontbuild.decomposeGlyph import decomposeGlyph
-from fontbuild.removeGlyphOverlap import removeGlyphOverlap
import ConfigParser
import os
@@ -252,6 +252,15 @@ def deleteGlyphs(f, deleteList):
f.removeGlyph(name)
+def removeGlyphOverlap(glyph):
+ """Remove overlaps in contours from a glyph."""
+ #TODO(jamesgk) verify overlaps exist first, as per library's recommendation
+ manager = BooleanOperationManager()
+ contours = glyph.contours
+ glyph.clearContours()
+ manager.union(contours, glyph.getPointPen())
+
+
def saveOTF(font, destFile, autohint=False):
"""Save a RoboFab font as an OTF binary using ufo2fdk."""
diff --git a/scripts/lib/fontbuild/removeGlyphOverlap.py b/scripts/lib/fontbuild/removeGlyphOverlap.py
deleted file mode 100644
index 844f041..0000000
--- a/scripts/lib/fontbuild/removeGlyphOverlap.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from booleanOperations import BooleanOperationManager
-
-
-def removeGlyphOverlap(glyph):
- """Remove overlaps in contours from a glyph."""
- #TODO(jamesgk) verify overlaps exist first, as per library's recommendation
- manager = BooleanOperationManager()
- contours = glyph.contours
- glyph.clearContours()
- manager.union(contours, glyph.getPointPen())