Turn it all into readable PostScript

The following code is exactly the same as before, but with the redefined symbols turned back into what they really mean.

I added a little indentation and whitespace. And comments too.

14 string dup dup dup                 % push a 14 char long string, and 3 references to it on the stack
260 40 moveto 90 rotate               % reorient the whole page (rotate left)
exch (ThePerl) /T exch def            % define the T and J strings
exch (Journal) /J exch def            % while moving around the top of the stack
220                                   % keep this for later use
exch 0 T putinterval                  % put the string in T at position 0
exch 7 J putinterval                  % put the string in J at position 7
                                      % so now the string on top of the stack is (ThePerlJournal)
/Times-Bold exch selectfont           % current font is now Times-Bold 220
exch /m$ pop T ($*!$"=!$ " ) pop
dup true charpath                     % define a path with string T (in Times-Bold 220)
{!"""}pop stringwidth pop{""!}pop neg % negate the width of the string T (the copy left on the stack)
{!#}pop 220 neg rmoveto               % move back horizontally and down vertically
{!!}pop J false charpath              % now add the J string to the current path
clip                                  % and make all this the clipping path
dup pop 0 dup moveto                  % go back to (0,0)
6 {!!}pop /Times-Bold exch selectfont % set curent font to Times-Bold 6
% we now have a clipping path, and two copies of (ThePerlJournal) on top of the stack
105{!!}pop {$ ! $ " !  #! ##} pop {   % start of the repeat loop
   dup dup stringwidth dup pop pop    % circuitously get the length of the string
   exch{"}pop 22{dup show}repeat      % put the string back on top and print it 22 times
   {"}pop exch 22 mul{$ "} pop neg    % calculate the width of the printed line 
   {!#! $ "}pop 8 .65 mul{$ # # $}pop % the vertical step
   neg {"}pop rmoveto pop{"}pop       % move to the start of the following line and cleanup
} repeat                              % repeat this 105 times
pop dup {  $ " ! ! ! $ " ! !" "#"  #"!"""""! #" " # "m/;@ARGV=(@ARGV[-14..-1])x50;q} 
0 dup sub showpage {}                 % preceding line is useless, 0 - 0 is null, but print the whole page

Previous | Next


Copyright © 2000-2001, Philippe "BooK" Bruhat.