The interpreter creates a path for the character and it is then either stroked or filled as per usual. The first three lines in the above example are housekeeping that needs to be done the first time a font is used. A slightly modified version of the above uses charpath to treat the characters in the string as a path which can be stroked or filled. For those with colour LaserWriters the main instruction of interest that replaces the setgray is previous examples is setrgbcolor . The extend of this language will not be covered here except to show some examples of procedures that can be useful to simplify postscript generation and make postscript files smaller.
Lets assume one needed to draw lots of squares with no border but filled with a particular colour.
One could create the path repeatedly for each one, alternatively one could define something like the following. The procedure draws a unit square and it expects the RGB colour to be on the stack. Even if one is simply drawing lots of lines on the page, in order to reduce the file size it is common to define a procedure as shown below. The following are some other commonly used commands along with a brief description, again you should consult a reference manual for the entire set of commands. The arguments are xcenter, ycenter, radius, start angle, stop angle.