]> git.donarmstrong.com Git - lilypond.git/commitdiff
Support --local-datadir for output-distance
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 4 Jun 2007 02:07:08 +0000 (23:07 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 4 Jun 2007 02:07:08 +0000 (23:07 -0300)
Take fonts from test data, so we use the correct font for each
version.

buildscripts/output-distance.py

index c60e965baf91c6ea88f957382e1d9136e0164e6c..ea82a93de9c1c7d32d37ca79836725764aa6b16e 100644 (file)
@@ -609,12 +609,17 @@ class SignatureFileLink (FileLink):
             for f in glob.glob (pat):
                 infile = f
                 outfile = (dest_dir + '/' + f).replace ('.eps', '.png')
-
+                data_option = ''
+                if options.local_data_dir:
+                    data_option = ('-slilypond-datadir=%s/share/lilypond/current '
+                                   % os.path.split(infile)[0])
+                
                 mkdir (os.path.split (outfile)[0])
                 cmd = ('gs -sDEVICE=png16m -dGraphicsAlphaBits=4 -dTextAlphaBits=4 '
+                       ' %(data_option)s '
                        ' -r101 '
                        ' -sOutputFile=%(outfile)s -dNOSAFER -dEPSCrop -q -dNOPAUSE '
-                       ' %(infile)s  -c quit '  % locals ())
+                       ' %(infile)s  -c quit ') % locals ()
 
                 files_created[oldnew].append (outfile)
                 system (cmd)
@@ -1221,6 +1226,13 @@ def main ():
                   action="store_true",
                   help="Create PNGs from EPSes")
 
+
+    p.add_option ('--local-datadir',
+                  dest="local_data_dir",
+                  default=False,
+                  action="store_true",
+                  help='whether to use the share/lilypond/ directory in the test directory')
+
     p.add_option ('-o', '--output-dir',
                   dest="output_dir",
                   default=None,