X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ps%2Flilyponddefs.ps;h=a53b452af7ba59e3785cc01c0c23a5bfd2e4763f;hb=6d209ea6b403aa10956379d50a4f46a7e5fe37c9;hp=b4116e2b21276363c483052fb4b85d47852856f0;hpb=abd05b0ad0ccc4b63bb77ed128a8f28d5d48f330;p=lilypond.git diff --git a/ps/lilyponddefs.ps b/ps/lilyponddefs.ps index b4116e2b21..a53b452af7 100644 --- a/ps/lilyponddefs.ps +++ b/ps/lilyponddefs.ps @@ -9,36 +9,29 @@ % To let gs load fonts from builddir, do: % export GS_LIB=$(pwd)/mf/out:/usr/share/texmf/fonts/type1/bluesky/cm -/staff-line-thickness lilypondpaperlinethickness def -/staff-height lilypondpaperstaffheight def -/line-width lilypondpaperlinewidth def -/lily-output-units 2.83464 def %% milimeter -% /lily-output-units 0.996264 def %% true points. - -/output-scale lilypondpaperoutputscale lily-output-units mul def - -/set-ps-scale-to-lily-scale { output-scale output-scale scale } bind def +/set-ps-scale-to-lily-scale { + lily-output-units output-scale mul + lily-output-units output-scale mul scale +} bind def -/paper-size { lilypondpaperpapersize } bind def /init-paper { gsave - .1 setlinewidth - clippath pathbbox newpath - /vsize exch def - /hsize exch def pop pop pop pop + clippath pathbbox newpath + /vsize exch def + /hsize exch def pop pop pop % FIXME /top-margin 2 def hsize line-width sub 2 div /left-margin exch def grestore } bind def -/place-box -{ + +/place-box { /object exch def gsave - %exch translate + % exch translate translate 0 0 moveto object @@ -49,65 +42,57 @@ %/FONTLENGTH 256 bind def -% reencode-font + /reencode-dict 5 dict def -/reencode-font -{ - reencode-dict - begin - /name exch def - /encoding exch def - /base-font exch def - % note: Needs ps level 2 - /font base-font maxlength dict def - base-font { - exch dup dup /FID ne exch /Encoding ne and - { exch font 3 1 roll put } - { pop pop } ifelse - } forall - font /FontName name put - font /Encoding encoding put - name font definefont pop - end -} bind def -/start-page -{ -} bind def -/stop-page -{ - showpage +% reencode-font +/reencode-font { + reencode-dict begin + /name exch def + /encoding exch def + /base-font exch def + % note: Needs ps level 2 + /font base-font maxlength dict def + base-font { + exch dup dup /FID ne exch /Encoding ne and + { exch font 3 1 roll put } + { pop pop } ifelse + } forall + font /FontName name put + font /Encoding encoding put + name font definefont pop + end } bind def -/stop-last-page -{ + +% start-system +/start-system { + gsave } bind def -/start-system % x y -{ +/start-page { gsave - exch output-scale mul exch - output-scale mul vsize exch sub translate + 0 + vsize translate } bind def -/stop-system -{ - /the-line exch def - the-line stroke grestore + +/stop-system { + /the-line exch def + the-line stroke grestore } bind def -/end-lilypond-output -{ -% showpage + +/end-lilypond-output { +% showpage } bind def -staff-line-thickness setlinewidth -% set postscript paper size -paper-size +/init-lilypond-parameters { + staff-line-thickness setlinewidth + staff-height init-paper +} bind def -% initialise paper dimensions -staff-height init-paper % end lilyponddefs.ps