]> git.donarmstrong.com Git - lilypond.git/blob - ps/lilyponddefs.ps
remove reencode-font
[lilypond.git] / ps / lilyponddefs.ps
1 %!PS-Adobe-2.0: lilyponddefs.ps
2 % TODO:
3 %  * junk all magic, start-line/stop-line just: placebox @ x.y
4 %
5 % Functions for direct PostScript output
6
7 % /setgray { 1 add } bind def
8
9 % To let gs load fonts from builddir, do:
10 % export GS_LIB=$(pwd)/mf/out:/usr/share/texmf/fonts/type1/bluesky/cm
11
12
13 /set-ps-scale-to-lily-scale {
14         lily-output-units output-scale mul
15         lily-output-units output-scale mul scale
16 } bind def
17
18
19 /init-paper {
20         gsave
21         clippath pathbbox newpath
22         /vsize exch def
23         /hsize exch def pop pop pop
24         % FIXME
25         /top-margin 2 def
26         hsize line-width sub 2 div /left-margin exch def
27         grestore
28 } bind def
29
30
31 /place-box {
32         /object exch def
33         gsave
34         % exch translate
35         translate
36         0 0 moveto
37         object
38         grestore
39 } bind def
40
41
42 % start-system
43 /start-system {
44     gsave
45 } bind def
46
47 /start-page {
48     gsave
49     0
50     vsize translate
51 } bind def
52
53
54 /stop-system {
55         /the-line exch def
56         the-line stroke grestore
57 } bind def
58
59
60 /end-lilypond-output {
61 %       showpage
62 } bind def
63
64
65 /init-lilypond-parameters {
66         staff-line-thickness setlinewidth
67         staff-height init-paper
68 } bind def
69
70
71 % end lilyponddefs.ps