]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/mf-to-table.py
*** empty log message ***
[lilypond.git] / buildscripts / mf-to-table.py
index 365dedb02afd1112a7815f5092e7f7f21df3ef1d..f3b9c2e661fd6cee2810624bd91b17fc0bc7b5a0 100644 (file)
@@ -69,10 +69,15 @@ def parse_logfile (fn):
                tags = string.split(l, '@:')
                if tags[0] == 'group':
                        group = tags[1]
+               elif tags[0] == 'puorg':
+                       group = ''
                elif tags[0] == 'char':
+                       name = tags[9]
+                       if group:
+                               name = group + '-' + name
                        m = {
                                'description':  tags[1],
-                               'name': group + '-' + tags[9],
+                               'name': name, 
                                'tex': tags[10],
                                'code': string.atoi (tags[2]),
                                'breapth':string.atof (tags[3]),
@@ -166,7 +171,7 @@ def write_fontlist (file, global_info, charmetrics):
        file.write (r"""
 %% LilyPond file to list all font symbols and the corresponding names
 %% Automatically generated by mf-to-table.py
-\score{ \lyrics \new Lyrics { \time %d/8
+\score{ \new Lyrics \lyrics { \time %d/8
 """ % (2*per_line+1))
 
        count = 0
@@ -193,12 +198,12 @@ def write_fontlist (file, global_info, charmetrics):
     interscoreline = 1.0
     indent = 0.0 \cm
     \context {
-      \LyricsContext
+      \Lyrics
       \override SeparationItem #'padding = #2
       minimumVerticalExtent = ##f
     }
     \context {
-       \ScoreContext
+       \Score
        \remove "Bar_number_engraver"
        }
        }
@@ -258,7 +263,7 @@ for opt in options:
                texfile_nm = a
        elif o == '--enc':
                enc_nm = a
-       elif o == '--ly' or o == '-':
+       elif o == '--ly' or o == '-l':
                lyfile_nm = a
        elif o== '--help' or o == '-h':
                help()
@@ -275,7 +280,7 @@ for opt in options:
 base = re.sub ('.tex$', '', texfile_nm)
 
 for filenm in files:
-       (g,m, deps) =  parse_logfile (filenm)
+       (g, m, deps) = parse_logfile (filenm)
        cs = tfm_checksum (re.sub ('.log$', '.tfm', filenm))
        afm = open (afmfile_nm, 'w')
 
@@ -286,7 +291,7 @@ for filenm in files:
        del g['DesignSize']
        
        write_afm_metric (afm, g, m)
-       
+
        write_tex_defs (open (texfile_nm, 'w'), g, m)
        enc_name = 'FetaEncoding'
        if re.search ('parmesan', filenm) :
@@ -294,12 +299,14 @@ for filenm in files:
        elif re.search ('feta-brace', filenm) :
                enc_name = 'FetaBraceEncoding'
 
-               
        write_ps_encoding (enc_name, open (enc_nm, 'w'), g, m)
 
-       write_deps (open (depfile_nm, 'wb'), deps, [base + '.dvi', base + '.pfa', base + '.pfb',  texfile_nm, afmfile_nm])
-       if lyfile_nm != '':
-               write_fontlist(open (lyfile_nm, 'w'), g, m)
+       if depfile_nm:
+               write_deps (open (depfile_nm, 'wb'), deps,
+                           [base + '.dvi', base + '.pfa', base + '.pfb',
+                            texfile_nm, afmfile_nm])
+       if lyfile_nm:
+               write_fontlist (open (lyfile_nm, 'w'), g, m)