summaryrefslogtreecommitdiff
path: root/sys/src/cmd/postscript/postdaisy/postdaisy.ps
diff options
context:
space:
mode:
authorTaru Karttunen <taruti@taruti.net>2011-03-30 15:46:40 +0300
committerTaru Karttunen <taruti@taruti.net>2011-03-30 15:46:40 +0300
commite5888a1ffdae813d7575f5fb02275c6bb07e5199 (patch)
treed8d51eac403f07814b9e936eed0c9a79195e2450 /sys/src/cmd/postscript/postdaisy/postdaisy.ps
Import sources from 2011-03-30 iso image
Diffstat (limited to 'sys/src/cmd/postscript/postdaisy/postdaisy.ps')
-rwxr-xr-xsys/src/cmd/postscript/postdaisy/postdaisy.ps74
1 files changed, 74 insertions, 0 deletions
diff --git a/sys/src/cmd/postscript/postdaisy/postdaisy.ps b/sys/src/cmd/postscript/postdaisy/postdaisy.ps
new file mode 100755
index 000000000..eda3a9d35
--- /dev/null
+++ b/sys/src/cmd/postscript/postdaisy/postdaisy.ps
@@ -0,0 +1,74 @@
+%
+% Version 3.3.2 prologue for Diablo 1640 files.
+%
+
+/#copies 1 store
+/aspectratio 1 def
+/font /Courier def
+/formsperpage 1 def
+/hmi 12 def
+/landscape false def
+/magnification 1 def
+/margin 10 def
+/orientation 0 def
+/resolution 240 def
+/rotation 1 def
+/xoffset .25 def
+/yoffset .25 def
+
+/roundpage true def
+/useclippath true def
+/pagebbox [0 0 612 792] def
+
+/inch {72 mul} bind def
+/min {2 copy gt {exch} if pop} bind def
+
+/ashow {ashow} bind def % so later references don't bind
+/stringwidth {stringwidth} bind def
+
+/setup {
+ counttomark 2 idiv {def} repeat pop
+
+ landscape {/orientation 90 orientation add def} if
+ /scaling 72 resolution div def
+ currentdict /pointsize known not {/pointsize hmi def} if
+ font findfont pointsize scaling div scalefont setfont
+ /charwidth (M) stringwidth pop def
+
+ pagedimensions
+ xcenter ycenter translate
+ orientation rotation mul rotate
+ width 2 div neg height 2 div translate
+ xoffset inch yoffset inch neg translate
+ margin 2 div dup neg translate
+ magnification dup aspectratio mul scale
+ height width div 1 min dup scale
+ scaling dup scale
+} def
+
+/pagedimensions {
+ useclippath userdict /gotpagebbox known not and {
+ /pagebbox [clippath pathbbox newpath] def
+ roundpage currentdict /roundpagebbox known and {roundpagebbox} if
+ } if
+ pagebbox aload pop
+ 4 -1 roll exch 4 1 roll 4 copy
+ landscape {4 2 roll} if
+ sub /width exch def
+ sub /height exch def
+ add 2 div /xcenter exch def
+ add 2 div /ycenter exch def
+ userdict /gotpagebbox true put
+} def
+
+/pagesetup {/page exch def 0 0 moveto} bind def
+
+/t {
+ charwidth sub /advance exch def
+ neg /y exch def
+ counttomark 2 idiv {y moveto advance 0 3 -1 roll ashow} repeat
+} bind def
+
+/f {findfont pointsize scaling div scalefont setfont} bind def
+
+/done {/lastpage where {pop lastpage} if} def