summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/build-v2.py13
-rw-r--r--scripts/lib/fontbuild/saveOTF.py16
2 files changed, 12 insertions, 17 deletions
diff --git a/scripts/build-v2.py b/scripts/build-v2.py
index b21a8b4..d987116 100644
--- a/scripts/build-v2.py
+++ b/scripts/build-v2.py
@@ -52,20 +52,17 @@ def condenseFont(f, scale=.8, stemWidth=185):
proj = FontProject(rg.font, BASEDIR, "res/roboto.cfg", th.ffont)
-'''
-proj.incrementBuildNumber()
-'''
+#proj.incrementBuildNumber()
# FAMILYNAME = "Roboto 2 DRAFT"
# FAMILYNAME = "Roboto2"
FAMILYNAME = "Roboto"
proj.buildOTF = True
-'''
-proj.checkOTFOutlines = True
-proj.autohintOTF = True
-proj.buildFEA = True
-'''
+#proj.checkOTFOutlines = True
+#proj.autohintOTF = True
+#proj.buildFEA = True
+
proj.generateFont(th.font,"%s/Thin/Regular/Th"%FAMILYNAME)
proj.generateFont(Mix([th,rg], 0.45),"%s/Light/Regular/Lt"%FAMILYNAME)
proj.generateFont(Mix([th,rg], RPoint(0.90, 0.92)),"%s/Regular/Regular/Rg"%FAMILYNAME)
diff --git a/scripts/lib/fontbuild/saveOTF.py b/scripts/lib/fontbuild/saveOTF.py
index 25c9dea..88de52f 100644
--- a/scripts/lib/fontbuild/saveOTF.py
+++ b/scripts/lib/fontbuild/saveOTF.py
@@ -9,7 +9,7 @@ from ufo2fdk.outlineOTF import OutlineOTFCompiler
def saveOTF(font, destFile, checkOutlines=False, autohint=False):
"""Save a RoboFab font as an OTF binary using ufo2fdk."""
- compiler = OTFCompiler(partsCompilerClass=_PartsCompilerBlankGlyphOrder,
+ compiler = OTFCompiler(partsCompilerClass=_PartsCompilerCustomGlyphOrder,
outlineCompilerClass=_OutlineCompilerFormat12)
reports = compiler.compile(font, destFile, checkOutlines=checkOutlines,
autohint=autohint)
@@ -49,21 +49,19 @@ def conformToAGL(font, glyphList):
font.features.text = font.features.text.replace(oldName, newName)
-class _PartsCompilerBlankGlyphOrder(MakeOTFPartsCompiler):
- """Child class of parts compiler which produces a blank glyph order file.
-
- This seems necessary for now because AFDKO's makeotf function produces
- Roboto OTFs without ASCII mappings when called with ufo2fdk's default glyph
- order file.
- """
+class _PartsCompilerCustomGlyphOrder(MakeOTFPartsCompiler):
+ """OTF parts compiler that produces a custom glyph order file."""
def setupFile_glyphOrder(self, path):
+ # just create a blank file -- this seems necessary for now because
+ # AFDKO's makeotf function produces Roboto OTFs without ASCII mappings
+ # when called with ufo2fdk's default glyph order file
f = open(path, "w")
f.close()
class _OutlineCompilerFormat12(OutlineOTFCompiler):
- """Child class of outline compiler to work with format 12 cmaps."""
+ """OTF outline compiler to work with format 12 cmaps."""
def setupTable_cmap(self):
"""Set up cmap exactly like ufo2fdk, switching format 4 for 12."""