#
# source file of the GNU LilyPond music typesetter
#
-# (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+# (c) 1997--2006 Han-Wen Nienhuys <hanwen@cs.uu.nl>
import os
import sys
file.write ('] def\n')
-def write_fontlist (file, global_info, charmetrics):
- ## nm = global_info['FontFamily']
- nm = font_family
- per_line = 2
- file.write (
-r"""%% LilyPond file to list all font symbols and the corresponding names
-%% Automatically generated by mf-to-table.py
-
-\score {
- \lyrics { \time %d/8
-""" % (2 * per_line + 1))
-
- count = 0
- for m in charmetrics:
- count += 1
-
- ## \musicglyph and \markup require "_" to be escaped
- ## differently
- scm_string = re.sub ('_', r'_', m['name'])
-
- file.write (''' \\markup { \\raise #0.75 \\vcenter
- \\musicglyph #"%s"
- \\typewriter " %s" } 4
- \\noBreak
- ''' % (scm_string, scm_string))
-
- if (count % per_line) == 0:
- file.write (' \\skip 8 \\break\n')
- file.write (r""" }
-
- \layout {
- interscoreline = 1.0
- indent = 0.0 \cm
- \context {
- \Lyrics
- \override SeparationItem #'padding = #2
- minimumVerticalExtent = ##f
- }
- \context {
- \Score
- \remove "Bar_number_engraver"
- }
- }
-}
-""")
-
-
def write_deps (file, deps, targets):
for t in targets:
t = re.sub ( '^\\./', '', t)
(options, files) = \
getopt.getopt (sys.argv[1:],
- 'a:d:hl:o:p:t:',
+ 'a:d:ho:p:t:',
['enc=', 'outdir=', 'dep=', 'lisp=',
'global-lisp=',
- 'tex=', 'ly=', 'debug', 'help', 'package='])
+ 'tex=', 'debug', 'help', 'package='])
global_lisp_nm = ''
char_lisp_nm = ''
global_lisp_nm = a
elif o == '--enc':
enc_nm = a
- elif o == '--ly' or o == '-l':
- lyfile_nm = a
elif o== '--help' or o == '-h':
help()
elif o == '--debug':
write_deps (open (depfile_nm, 'wb'), deps,
[base + '.log', base + '.dvi', base + '.pfa',
base + '.pfb', texfile_nm])
- if lyfile_nm:
- write_fontlist (open (lyfile_nm, 'w'), g, m)