Path: utzoo!mnetor!uunet!husc6!rutgers!iuvax!cdlee From: cdlee@iuvax.cs.indiana.edu Newsgroups: comp.sources.d Subject: Re: PScal Enhancments Message-ID: <12800001@iuvax> Date: 29 Dec 87 19:23:00 GMT References: <115@slxsys.specialix.co.uk> Organization: Indiana University CSCI, Bloomington Lines: 127 Nf-ID: #R:slxsys.specialix.co.uk:115:iuvax:12800001:000:3183 Nf-From: iuvax.cs.indiana.edu!cdlee Dec 29 14:23:00 1987 /* Written 1:21 pm Dec 18, 1987 by jpp@slxsys in iuvax:comp.sources.d */ /* ---------- "PScal Enhancments" ---------- */ I have made a couple of "enhancments" to the PScal program posted in comp.sources.misc/8712/6. I have Changed the Font used to an outline font and cut out the grid around the numbers. I also changed the script to write to stdout so that output may be directed to a file or to the printer as needed. diffs follow 15c15 < set printer="-Plaser" --- > set printer="" 44c44 < lpr $printer < cat $printer < % Outline font support and improved grid added by John Pettitt > % Specialix International, Dec 1987, (jpp@slxsys.co.uk) > 59,60c62,64 < /titlefont /Times-Bold def < /dayfont /Helvetica-Bold def --- > /titlefont /Helvetica-Outline def > /dayfont /Times-Roman def > /numfont /Helvetica-Outline def 61a66,112 > % > % outline font making program from the cookbook (page 203) > % > /makeoutlinedict 7 dict def > /MakeOutlineFont > { makeoutlinedict begin > /uniqueid exch def > /strokewidth exch def > /newfontname exch def > /basefontname exch def > /basefontdict basefontname findfont def > /numentries basefontdict maxlength 1 add def > > basefontdict /UniqueID known not > > { /numentries numentries 1 add def } if > /outfontdict numentries dict def > > basefontdict > { exch dup /FID ne > { > exch outfontdict 3 1 roll put > } > { > pop pop > } ifelse > } forall > > outfontdict /FontName newfontname put > outfontdict /PaintType 2 put > outfontdict /StrokeWidth strokewidth put > outfontdict /UniqueID uniqueid put > newfontname outfontdict definefont pop > end > } def > % > % If you want to use another outline font change it here > % > /Helvetica-Bold /Helvetica-Outline 1000 54 div > /Helvetica-Bold findfont dup /UniqueID known > { /UniqueID get 1 add } > { pop 1 } > ifelse > MakeOutlineFont > % > % End of outline stuff > % 69c120 < dayfont findfont 10 scalefont setfont --- > dayfont findfont 15 scalefont setfont 75,80c126,141 < .5 setlinewidth < 60 { < gsave < 90 0 rlineto stroke < grestore < 0 -10 rmoveto --- > .3 setlinewidth > 5 { > 4 { % First 4 are shorter > gsave > 55 0 rmoveto > 35 0 rlineto stroke > grestore > 0 -10 rmoveto > } repeat > 5 { % Now 5 long lines > gsave > 90 0 rlineto stroke > grestore > 0 -10 rmoveto > } repeat > 0 -10 rmoveto % Leave a blank 83d143 < 87c147 < dayfont findfont 40 scalefont setfont --- > numfont findfont 40 scalefont setfont 137c197 < dayfont findfont 20 scalefont setfont --- > numfont findfont 20 scalefont setfont 209c269 < 0 0 moveto --- > 0 10 moveto -- John Pettitt UUCP :{backbone}!mcvax!ukc!pyrltd!slxsys!jpp Specialix Systems Domain :jpp%slxsys@pyra.co.uk London, UK. (Where else ? :-) Voice : +44 1 398 9422 (GMT) rn: core dumped /* End of text from iuvax:comp.sources.d */