🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #7878

Help needed

#7878
From: Christopher Morrow
Date: Thu, 26 Jan 1989 02:15
100 lines
2750 bytes
I have been trying to learn some postscript from the Postscript
Cookbook and tutorial (blue).  I was trying to use the circular text example 
towards the end of the book.  I cannot get it to go.  Has any one else
had this problem.  I have tried on Laserwriters NTX II from Unix
bsd4.3 and with atp on a Mac plus.

Attached is my file
I donot think that I have infringed copyright as it does not
work and therefore must be different from that presented in
the book.  The error is not clear with nothing usually emerging from
the printer.
%>lpr -v -Plw file
Please mail me direct as I donot usually read this news group.
-----------------------------------------------------------
/outsidecircletext
 { circtextdict begin
    /radius exch def
    /centerangle exch def
    /ptsize exch def
    /str exch def
    /xradius radius ptsize 4 div add def

  gsave
    centerangle str findhalfangle add rotate

  str
    {/charcode exch def
      () dup 0 charcode put outsideplacechar
    } forall
  grestore
 end
} def

/insidecircletext
  { circtextdict begin
     /radius exch def   /centerangle exch def
     /ptsize exch def   /str exch def
   
     /xradius radius ptsize 3 div sub def
     gsave
       centerangle str findhalfangle sub rotate
       str
        {/charcode exch def
         () dup 0 charcode put insideplacechar
        } forall
     grestore
   end
} def

/circtextdict 16 dict def
circtextdict begin
  /findhalfangle
    { stringwidth pop 2 div
       2 xradius mul pi mul div 360 mul
    } def

/outsideplacechar
  {/char exch def
   /halfangle char findhalfangle def
     gsave
      halfangle neg rotate
      radius 0 translate
      -90 rotate
      char stringwidth pop 2 div neg 0 moveto
      char show
   grestore
   halfangle 2 mul neg rotate
 } def

/insideplacechar
 {/char exch def
  /halfangle char findhalfangle def
  gsave
   halfangle rotate
   radius 0 translate
   90 rotate
   char stringwidth pop 2 div neg 0 moveto
   char show
  grestore
  halfangle 2 mul rotate
 } def

 /pi 3.1415923 def
end

/Times-Bold findfont 22 scalefont setfont

306 448 translate

(Symphony No. 9 (The Choral Symphony))
  22 90 140 outsidecircletext

/Times-Roman findfont 15 scalefont setfont
(Ludwig von Beethoven)
  15 90 118 outsidecircletext

(The New York Philharmonic Orchestra)
  15 270 118 insidecircletext

showpage
Technical Details
Message-ID: <1511@murdu.OZ>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari!murdu!morrow

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari!murdu!morrow
From: morrow@murdu.OZ (Christopher Morrow)
Newsgroups: comp.lang.postscript
Subject: Help needed
Keywords: Cookbook, Recipes, No go
Message-ID: <1511@murdu.OZ>
Date: 26 Jan 89 02:15:13 GMT
Organization: Comp Sci, Melbourne Uni, Australia
Lines: 100