X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=blobdiff_plain;f=scripts%2Flilypond-book.py;h=5aa91fc0aecdd3c38b5233b545cbd0430eeb0408;hb=870f7e6b7e7cad371400d83f357ab0c30cebeada;hp=9764e880853bd399a3fd11049e4fa56cb7f80fe0;hpb=845725d22e0dc8991406f1af912823ec87814567;p=lilypond.git diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 9764e88085..5aa91fc0ae 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -1135,6 +1135,8 @@ def get_bbox (filename): def make_pixmap (name): bbox = get_bbox (name + '.eps') + + margin = 0 fo = open (name + '.trans.eps' , 'w') fo.write ('%d %d translate\n' % (-bbox[0]+margin, -bbox[1]+margin)) @@ -1144,6 +1146,10 @@ def make_pixmap (name): x = (2* margin + bbox[2] - bbox[0]) * res / 72. y = (2* margin + bbox[3] - bbox[1]) * res / 72. + if x == 0: + x = 1 + if y == 0: + y = 1 cmd = r'''gs -g%dx%d -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=%s -r%d -dNOPAUSE %s %s -c quit ''' @@ -1284,7 +1290,6 @@ def option_help_str (o): arg = arg + o[0] return ' ' + sh + sep + long + arg - def options_help_str (opts): "Convert a list of options into a neatly formatted string" w = 0 @@ -1312,7 +1317,6 @@ Options: Warning: All output is written in the CURRENT directory. - Report bugs to bug-lilypond@gnu.org. Written by Tom Cato Amundsen and