]> git.donarmstrong.com Git - lilypond.git/blobdiff - ps/lilyponddefs.ps
release: 1.4.4
[lilypond.git] / ps / lilyponddefs.ps
index d4994a0e0f5757fd8fdc0b80f78273f218b73fb9..53fed1bb2c3ccf16b092d12f6526a7aa5de347e6 100644 (file)
        grestore
 } bind def
 
-/start-line
-{ 
+/start-line % height
+{
+       dup base-line-skip gt {
+               /line-height exch def
+       }
+       {
+               pop /line-height base-line-skip def
+       } ifelse
        line-y top-margin sub base-line-skip lt {
                showpage
                /line-y vsize top-margin sub def
 /stop-line
 { 
        /the-line exch def
-       0 0 moveto the-line clippath pathbbox
+       the-line
        stroke
        grestore
-       exch 4 -1 roll
-       sub
-       3 1 roll
-       exch sub
-       %pstack
-       %
-       % ugh: now we should have `width height' on stack,
-       % but it's probably just the width and height of last element
-       % (the last staff)
-       % How do we get all heights of all staffs in a line?
-       %
-       % output-scale div neg line-y add /line-y exch def
-       %
-       % discarding height...
-       pop
-       %
-       % discard width
-       pop
-       % use fixed base-line-skip for now
-       line-y base-line-skip output-scale mul sub /line-y exch def
+       line-y line-height output-scale mul sub /line-y exch def
 } bind def
 
 % FIXME: font definitions should come from LilyPond
 
 /make-lilypond-title
 {
+       currentdict /lilyponddedication known {
+               normal-font lilyponddedication set-centered
+               line-y 10 sub /line-y exch def
+       } if
        currentdict /lilypondtitle known {
                huge-bold-font lilypondtitle set-centered
                line-y 5 sub /line-y exch def
        currentdict /lilypondsubsubtitle known {
                large-bold-font lilypondsubsubtitle set-centered
        } if
+       line-y /mini-page exch def
        currentdict /lilypondcomposer known {
                large-smallcaps-font lilypondcomposer set-right
+               line-y 2 sub /line-y exch def
        } if
        currentdict /lilypondopus known {
                normal-font lilypondopus set-right
+               line-y 3 sub /line-y exch def
        } if
        currentdict /lilypondarranger known {
                normal-font lilypondarranger set-right
+               line-y 3 sub /line-y exch def
+       } if
+       currentdict /lilypondpoet known {
+               mini-page /line-y exch def
+               normal-font lilypondpoet set-left
+               line-y 3 sub /line-y exch def
+       } if
+       currentdict /lilypondtexttranslator known {
+               normal-font lilypondtexttranslator set-left
+               line-y 3 sub /line-y exch def
        } if
        currentdict /lilypondinstrument known {
                large-font lilypondinstrument set-centered
 
 /turnOnExperimentalFeatures { } bind def
 
-
 staff-line-thickness setlinewidth
 
+% set postscript paper size
 paper-size
 
+% initialise paper dimensions
 staff-height init-paper
 
 /line-x left-margin def