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
12 /staff-line-thickness lilypondpaperlinethickness def
13 /staff-height lilypondpaperstaffheight def
14 /line-width lilypondpaperlinewidth def
16 /lily-output-units 2.83464 def %% milimeter
17 % /lily-output-units 0.996264 def %% true points.
19 /output-scale lilypondpaperoutputscale lily-output-units mul def
21 /set-ps-scale-to-lily-scale { output-scale output-scale scale } bind def
23 /paper-size { lilypondpaperpapersize } bind def
28 clippath pathbbox newpath
30 /hsize exch def pop pop pop pop
33 hsize line-width sub 2 div /left-margin exch def
48 %% http://bibliofile.mc.duke.edu/gww/fonts/postscript-utilities/encoding-vectors.html
50 %/FONTLENGTH 256 bind def
52 %<font> <encoding> <name> reencode-font
53 /reencode-dict 5 dict def
61 % note: Needs ps level 2
62 /font base-font maxlength dict def
64 exch dup dup /FID ne exch /Encoding ne and
65 { exch font 3 1 roll put }
68 font /FontName name put
69 font /Encoding encoding put
70 name font definefont pop
90 exch output-scale mul exch
91 output-scale mul vsize exch sub translate
97 the-line stroke grestore
105 staff-line-thickness setlinewidth
107 % set postscript paper size
110 % initialise paper dimensions
111 staff-height init-paper
113 % end lilyponddefs.ps