lib/fontcustom/scripts/generate.py in fontcustom-1.3.0.beta4 vs lib/fontcustom/scripts/generate.py in fontcustom-1.3.0
- old
+ new
@@ -15,11 +15,10 @@
parser.add_argument('manifest', help='Path to .fontcustom-manifest.json')
args = parser.parse_args()
except ImportError:
import optparse
parser = optparse.OptionParser()
- parser.add_option('manifest', help='Path to .fontcustom-manifest.json')
(nothing, args) = parser.parse_args()
manifestfile = open(args.manifest, 'r+')
manifest = json.load(manifestfile)
options = manifest['options']
@@ -92,10 +91,10 @@
font.generate(fontfile + '.svg')
manifest['fonts'].append(fontfile + '.ttf')
manifest['fonts'].append(fontfile + '.svg')
# Hint the TTF file
- subprocess.call('ttfautohint -s -f -n ' + fontfile + '.ttf ' + fontfile + '-hinted.ttf > /dev/null 2>&1 && mv ' + fontfile + '-hinted.ttf ' + fontfile + '.ttf', shell=True)
+ subprocess.call('ttfautohint -s -f -n -W ' + fontfile + '.ttf ' + fontfile + '-hinted.ttf > /dev/null 2>&1 && mv ' + fontfile + '-hinted.ttf ' + fontfile + '.ttf', shell=True)
# Fix SVG header for webkit
# from: https://github.com/fontello/font-builder/blob/master/bin/fontconvert.py
svgfile = open(fontfile + '.svg', 'r+')
svgtext = svgfile.read()