summaryrefslogtreecommitdiff
path: root/scripts/lib/fontbuild/Build.py
diff options
context:
space:
mode:
authorJames Godfrey-Kittle <jamesgk@google.com>2015-03-09 13:09:55 -0700
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:32 -0700
commit55dccaf63fbbc6ebf2dfc0a6681ce43c841f6f05 (patch)
treeecc65110ba6b18312dda5c0943f0e25d8cb3f093 /scripts/lib/fontbuild/Build.py
parent960e9133de3102c8de784fd55bad8670f06ff31a (diff)
Use booleanOperations for overlap removal.
Diffstat (limited to 'scripts/lib/fontbuild/Build.py')
-rw-r--r--scripts/lib/fontbuild/Build.py23
1 files changed, 6 insertions, 17 deletions
diff --git a/scripts/lib/fontbuild/Build.py b/scripts/lib/fontbuild/Build.py
index c524e7a..b02ae8b 100644
--- a/scripts/lib/fontbuild/Build.py
+++ b/scripts/lib/fontbuild/Build.py
@@ -48,7 +48,6 @@ class FontProject:
self.buildnumber = self.loadBuildNumber()
self.buildOTF = False
- self.checkOTFOutlines = False
self.autohintOTF = False
self.buildTTF = False
self.buildFEA = False
@@ -167,19 +166,11 @@ class FontProject:
otfName = self.generateOutputPath(f, "otf")
saveOTF(newFont, otfName, autohint=self.autohintOTF)
- if self.checkOTFOutlines or self.buildTTF:
+ if self.buildTTF:
+ log(">> Generating TTF file")
import fontforge
otFont = fontforge.open(otfName)
-
- if self.checkOTFOutlines:
- log(">> Removing overlaps")
- for glyphName in otFont:
- otFont[glyphName].removeOverlap()
- otFont.generate(otfName)
-
- if self.buildTTF:
- log(">> Generating TTF file")
- otFont.generate(self.generateOutputPath(f, "ttf"))
+ otFont.generate(self.generateOutputPath(f, "ttf"))
if self.buildFEA:
log(">> Generating FEA files")
@@ -242,10 +233,9 @@ def generateGlyphs(f, glyphNames, glyphList={}):
generateGlyph(f, glyphName, glyphList)
def cleanCurves(f):
- #TODO(jamesgk) remove calls to removeGlyphOverlap if we use FDK or FontForge
- # log(">> Removing overlaps")
- # for g in f:
- # removeGlyphOverlap(g)
+ log(">> Removing overlaps")
+ for g in f:
+ removeGlyphOverlap(g)
# log(">> Mitring sharp corners")
# for g in f:
@@ -254,7 +244,6 @@ def cleanCurves(f):
# log(">> Converting curves to quadratic")
# for g in f:
# glyphCurvesToQuadratic(g)
- pass
def deleteGlyphs(f, deleteList):