diff options
author | David Kastrup <dak@gnu.org> | 2014-05-27 12:15:14 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2014-05-27 12:15:14 +0200 |
commit | cc949a9fd031c51e1106f47c138357c16d1e6c2e (patch) | |
tree | 7db0dabaae9b1360e1cf6e352df7e13e1b36e730 /scripts | |
parent | 26aefbd781d9b8c74342bd43607eaf1bbae3fcc7 (diff) |
Revert "Generate a .pe script for one design size at a time."
This reverts commit 366316fd6be846c2050be6b1b3955b261026187e.
See <URL:http://permalink.gmane.org/gmane.comp.gnu.lilypond.devel/58153>
for the rationale
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/gen-emmentaler-scripts.py | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/scripts/build/gen-emmentaler-scripts.py b/scripts/build/gen-emmentaler-scripts.py index 935baafca4..9f645b5929 100644 --- a/scripts/build/gen-emmentaler-scripts.py +++ b/scripts/build/gen-emmentaler-scripts.py @@ -6,26 +6,25 @@ import os (options, files) = \ getopt.getopt (sys.argv[1:], - '', - ['dir=', 'design-size=']) + '', + ['dir=']) + -design_size = 0 outdir = '' for opt in options: o = opt[0] a = opt[1] if o == '--dir': outdir = a - elif o == '--design-size': - design_size = int(a) else: print o raise getopt.error - -name = 'Emmentaler' -filename = name.lower () -script = '''#!@FONTFORGE@ +# Ugh +for design_size in [11,13,14,16,18,20,23,26]: + name = 'Emmentaler' + filename = name.lower () + script = '''#!@FONTFORGE@ New(); @@ -81,33 +80,32 @@ Generate("%(filename)s-%(design_size)d.svg"); Generate("%(filename)s-%(design_size)d.woff"); ''' % vars() -basename = '%s-%d' % (filename, design_size) -path = os.path.join (outdir, basename + '.genpe') -open (path, 'w').write (script) + basename = '%s-%d' % (filename, design_size) + path = os.path.join (outdir, basename + '.pe') + open (path, 'w').write (script) -subfonts = ['feta%(design_size)d', - 'feta-noteheads%(design_size)d', - 'feta-flags%(design_size)d', - 'parmesan%(design_size)d', - 'parmesan-noteheads%(design_size)d', - 'feta-alphabet%(design_size)d'] + subfonts = ['feta%(design_size)d', + 'feta-noteheads%(design_size)d', + 'feta-flags%(design_size)d', + 'parmesan%(design_size)d', + 'parmesan-noteheads%(design_size)d', + 'feta-alphabet%(design_size)d'] -ns = [] -for s in subfonts: - ns.append ('%s' % (s % vars())) + ns = [] + for s in subfonts: + ns.append ('%s' % (s % vars())) -subfonts_str = ' '.join (ns) + subfonts_str = ' '.join (ns) -open (os.path.join (outdir, '%(filename)s-%(design_size)d.subfonts' % vars()), 'w').write (subfonts_str) + open (os.path.join (outdir, '%(filename)s-%(design_size)d.subfonts' % vars()), 'w').write (subfonts_str) -path = os.path.join (outdir, '%s-%d.dep' % (filename, design_size)) + path = os.path.join (outdir, '%s-%d.dep' % (filename, design_size)) -deps = r'''%(filename)s-%(design_size)d.otf: $(outdir)/feta%(design_size)d.pfb \ + deps = r'''%(filename)s-%(design_size)d.otf: $(outdir)/feta%(design_size)d.pfb \ $(outdir)/parmesan%(design_size)d.pfb \ $(outdir)/feta-alphabet%(design_size)d.pfb feta%(design_size)d.otf-table \ feta%(design_size)d.otf-gtable ''' % vars() + open (path, 'w').write (deps) -open (path, 'w').write (deps) - -open (os.path.join (outdir, basename + '.fontname'), 'w').write ("%s-%d" % (name, design_size)) + open (os.path.join (outdir, basename + '.fontname'), 'w').write ("%s-%d" % (name, design_size)) |