1 %!PS-Adobe-2.0: lilyponddefs.ps
3 % * junk all magic, start-line/stop-line just: placebox @ x.y
5 % Functions for direct PostScript output
7 % /setgray { 1 add } bind def
9 % To let gs load fonts from builddir, do:
10 % export GS_LIB=$(pwd)/mf/out:/usr/share/texmf/fonts/type1/bluesky/cm
13 /set-ps-scale-to-lily-scale {
14 lily-output-units output-scale mul
15 lily-output-units output-scale mul scale
22 clippath pathbbox newpath
24 /hsize exch def pop pop pop
27 hsize line-width sub 2 div /left-margin exch def
42 %% http://bibliofile.mc.duke.edu/gww/fonts/postscript-utilities/encoding-vectors.html
44 %/FONTLENGTH 256 bind def
47 /reencode-dict 5 dict def
50 %<font> <encoding> <name> reencode-font
56 % note: Needs ps level 2
57 /font base-font maxlength dict def
59 exch dup dup /FID ne exch /Encoding ne and
60 { exch font 3 1 roll put }
63 font /FontName name put
64 font /Encoding encoding put
65 name font definefont pop
70 % <x> <y> start-system
80 the-line stroke grestore
84 /end-lilypond-output {
89 /init-lilypond-parameters {
90 staff-line-thickness setlinewidth
91 staff-height init-paper