diff options
author | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-17 11:51:32 -0700 |
---|---|---|
committer | jamesgk <jamesgk19@gmail.com> | 2015-04-17 11:51:32 -0700 |
commit | 737df6740bc2912ef25eebd147fad78398b2da65 (patch) | |
tree | ba6202119479fe0b8c98d7b6cb1be574cf65406b /scripts/lib/fontbuild/Build.py | |
parent | 502d6bd17afead6c44cbea9358725531c4375527 (diff) |
Exit after failing to generate OTF.
Part of #3
Diffstat (limited to 'scripts/lib/fontbuild/Build.py')
-rw-r--r-- | scripts/lib/fontbuild/Build.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/fontbuild/Build.py b/scripts/lib/fontbuild/Build.py index 424c49f..fda97b9 100644 --- a/scripts/lib/fontbuild/Build.py +++ b/scripts/lib/fontbuild/Build.py @@ -29,6 +29,7 @@ from fontbuild.mkmkFeature import GenerateFeature_mkmk from fontbuild.decomposeGlyph import decomposeGlyph import ConfigParser import os +import sys class FontProject: @@ -184,7 +185,10 @@ class FontProject: newFont = OpenFont(ufoName) otfName = self.generateOutputPath(f, "otf") builtSuccessfully = saveOTF(newFont, otfName, autohint=self.autohintOTF) - if builtSuccessfully and self.buildTTF: + if not builtSuccessfully: + sys.exit(1) + + if self.buildTTF: log(">> Generating TTF file") import fontforge otFont = fontforge.open(otfName) |