]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/fontextract.py
* scm/music-functions.scm (skip-to-last): new function. Show only
[lilypond.git] / python / fontextract.py
index 12f4313b271efda5998d4750f80540b701ae508b..1233921be8b8c1c3b65325256d864abbb09bfd0c 100644 (file)
@@ -70,7 +70,7 @@ def extract_fonts_from_file (extract_from_this, font_dict, filename):
                                                sys.stderr.write (_('Extracted %s')
                                                                  % curr_font_name + '\n')
 
-                               extract_from_this.remove (curr_font_name)
+                                       extract_from_this.remove (curr_font_name)
                        elif in_font:
                                curr_font.append (l)
                        if not extract_from_this:
@@ -78,11 +78,14 @@ def extract_fonts_from_file (extract_from_this, font_dict, filename):
 
                if extract_from_this:
                        sys.stderr.write ("Failed to extract %s from %s\n"
-                                         % (string.join (extract_from_this, ', '), f))
+                                         % (string.join (extract_from_this, ', '), filename))
 
 def write_extracted_fonts (output_file_name, font_dict):
+       if verbose:
+               sys.stderr.write( _('Writing fonts to %s') % output_file_name + '\n')
        output = open (output_file_name, 'w')
        output.write ('''%!PS-Adobe-3.0
+%%VMusage: 0 0 
 %%Creator: lilypond-extract-fonts
 ''')
 
@@ -94,7 +97,7 @@ def write_extracted_fonts (output_file_name, font_dict):
        for (k,v) in font_dict.items ():
                output.write ('\n%%%%BeginFont: %s\n' % k)
                output.write (v)
-               output.write ('\n%%%%EndFont')
+               output.write ('\n%%EndFont')
 
 
 def extract_fonts (output_file_name, input_files):