Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!gatech!bbn!bbn.com!malis From: malis@bbn.com (Andy Malis) Newsgroups: comp.sys.mac Subject: Re: Postscript fragment needed Message-ID: <39193@bbn.COM> Date: 27 Apr 89 17:12:54 GMT References: <13222@dartvax.Dartmouth.EDU> Sender: news@bbn.COM Reply-To: malis@BBN.COM (Andy Malis) Distribution: na Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 91 In article <13222@dartvax.Dartmouth.EDU> jonathan@eleazar.dartmouth.edu (Jonathan Altman) writes: > One nice tip that was given was how >to print the word "draft" in a 5% gray on entire pages. Here are two fragments. The first uses grey, the second prints "DRAFT" using an outline font. I personally like the second much better. Andy Malis UUCP: {harvard,rutgers,uunet}!bbn!malis ------- cut here ------- %! Procedure to print a light-gray DRAFT on pages gsave initmatrix 72 dup scale /Helvetica-Bold findfont 1 scalefont setfont (DRAFT) dup stringwidth pop 4.5 5.5 translate 45 rotate 2 div neg 0 moveto .95 setgray show grestore %% This overlay produces a 1 inch %% tall DRAFT at a 45 degree angle in the center of the page. %% The routine is self-adjusting so any string can be placed in instead %% of DRAFT in the above routine and used. ------- cut here ------- %! %% outline font program %% Postscript Language Tutorial and 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 % 120 seems to give light enough lettering /Helvetica-Bold /Helvetica-Outline1 1000 120 div /Helvetica-Bold findfont dup /UniqueID known { /UniqueID get 1 add } { pop 1 } ifelse MakeOutlineFont gsave initmatrix 72 dup scale /Helvetica-Outline1 findfont 1 scalefont setfont (DRAFT) dup stringwidth pop 4.5 5.5 translate 45 rotate 2 div neg 0 moveto show grestore ------- cut here ------- Andy Malis UUCP: {harvard,rutgers,uunet}!bbn!malis