summaryrefslogtreecommitdiff
path: root/scripts/lib/fontbuild/Build.py
diff options
context:
space:
mode:
authorJames Godfrey-Kittle <jamesgk@google.com>2015-04-15 14:36:58 -0700
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:35 -0700
commit0cf20ee912d634cb805ca5729b4228de27fe6dac (patch)
treef2ecb2f39467abd9758af91339238f3467996a2e /scripts/lib/fontbuild/Build.py
parent321c3e351c3c1a9e11fb2b9c2d3bf432608d8774 (diff)
Generate kern feature ourselves.
Diffstat (limited to 'scripts/lib/fontbuild/Build.py')
-rw-r--r--scripts/lib/fontbuild/Build.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/scripts/lib/fontbuild/Build.py b/scripts/lib/fontbuild/Build.py
index e416ed1..79171bd 100644
--- a/scripts/lib/fontbuild/Build.py
+++ b/scripts/lib/fontbuild/Build.py
@@ -22,6 +22,7 @@ from fontbuild.convertCurves import glyphCurvesToQuadratic
from fontbuild.mitreGlyph import mitreGlyph
from fontbuild.generateGlyph import generateGlyph
from fontTools.misc.transform import Transform
+from fontbuild.kerning import makeKernFeature
from fontbuild.features import readFeatureFile, writeFeatureFile
from fontbuild.markFeature import GenerateFeature_mark
from fontbuild.mkmkFeature import GenerateFeature_mkmk
@@ -45,7 +46,6 @@ class FontProject:
self.ot_classes = open(self.basedir + "/" + self.config.get("res","ot_classesfile")).read()
self.ot_kerningclasses = open(self.basedir + "/" + self.config.get("res","ot_kerningclassesfile")).read()
#self.ot_features = open(self.basedir + "/" + self.config.get("res","ot_featuresfile")).read()
- self.ot_kerningfeatures = self.basedir + "/" + self.config.get("res","ot_kerningfeaturesdir")
adobeGlyphList = open(self.basedir + "/" + self.config.get("res", "agl_glyphlistfile")).readlines()
self.adobeGlyphList = dict([line.split(";") for line in adobeGlyphList if not line.startswith("#")])
@@ -171,14 +171,7 @@ class FontProject:
if kern:
log(">> Generating kern classes")
readFeatureFile(f, self.ot_kerningclasses)
- weight = f.info.styleName.split()[0]
- if weight in ["Light", "Italic"]:
- weight = "Regular"
- elif weight in ["Medium", "Black"]:
- weight = "Bold"
- feature_path = os.path.join(
- self.ot_kerningfeatures, "Roboto-%s.fea" % weight)
- readFeatureFile(f, open(feature_path).read(), prepend=False)
+ makeKernFeature(f, self.ot_kerningclasses)
log(">> Generating font files")
GenerateFeature_mark(f)