%!PS-Adobe-3.0 EPSF-1.2 %%Title: (test1.ps) %%LanguageLevel: 1 %%Creator: DTR %%CreationDate: Sun Dec 8 18:25:51 2002 %%For: Console %%DocumentMedia: A4 595.27559 841.88976 0 ( ) ( ) %%Orientation: Portrait %%Pages: 1 %%BoundingBox: 0 0 595 841 %%EndComments %%BeginProlog %%BeginResource: PostScript::Simple /u {} def /STARTDIFFENC { mark } bind def /ENDDIFFENC { % /NewEnc BaseEnc STARTDIFFENC number or glyphname ... ENDDIFFENC - counttomark 2 add -1 roll 256 array copy /TempEncode exch def % pointer for sequential encodings /EncodePointer 0 def { % Get the bottom object counttomark -1 roll % Is it a mark? dup type dup /marktype eq { % End of encoding pop pop exit } { /nametype eq { % Insert the name at EncodePointer % and increment the pointer. TempEncode EncodePointer 3 -1 roll put /EncodePointer EncodePointer 1 add def } { % Set the EncodePointer to the number /EncodePointer exch def } ifelse } ifelse } loop TempEncode def } bind def % Define ISO Latin1 encoding if it doesnt exist /ISOLatin1Encoding where { % (ISOLatin1 exists!) = pop } { (ISOLatin1 does not exist, creating...) = /ISOLatin1Encoding StandardEncoding STARTDIFFENC 144 /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ENDDIFFENC } ifelse % Name: Re-encode Font % Description: Creates a new font using the named encoding. /REENCODEFONT { % /Newfont NewEncoding /Oldfont findfont dup length 4 add dict begin { % forall 1 index /FID ne 2 index /UniqueID ne and 2 index /XUID ne and { def } { pop pop } ifelse } forall /Encoding exch def % defs for DPS /BitmapWidths false def /ExactSize 0 def /InBetweenSize 0 def /TransformedChar 0 def currentdict end definefont pop } bind def % Reencode the std fonts: /Courier-iso ISOLatin1Encoding /Courier REENCODEFONT /Courier-Bold-iso ISOLatin1Encoding /Courier-Bold REENCODEFONT /Courier-BoldOblique-iso ISOLatin1Encoding /Courier-BoldOblique REENCODEFONT /Courier-Oblique-iso ISOLatin1Encoding /Courier-Oblique REENCODEFONT /Helvetica-iso ISOLatin1Encoding /Helvetica REENCODEFONT /Helvetica-Bold-iso ISOLatin1Encoding /Helvetica-Bold REENCODEFONT /Helvetica-BoldOblique-iso ISOLatin1Encoding /Helvetica-BoldOblique REENCODEFONT /Helvetica-Oblique-iso ISOLatin1Encoding /Helvetica-Oblique REENCODEFONT /Times-Roman-iso ISOLatin1Encoding /Times-Roman REENCODEFONT /Times-Bold-iso ISOLatin1Encoding /Times-Bold REENCODEFONT /Times-BoldItalic-iso ISOLatin1Encoding /Times-BoldItalic REENCODEFONT /Times-Italic-iso ISOLatin1Encoding /Times-Italic REENCODEFONT /Symbol-iso ISOLatin1Encoding /Symbol REENCODEFONT /box { newpath 3 copy pop exch 4 copy pop pop 8 copy pop pop pop pop exch pop exch 3 copy pop pop exch moveto lineto lineto lineto pop pop pop pop closepath } bind def /circle {newpath 0 360 arc closepath} bind def %%EndResource %%EndProlog % TRY CHANGING SOME OF THESE VALUES TO GET A FEEL % FOR WHAT HAPPENS 0.6 0 0 setrgbcolor %red /Arial findfont 20 scalefont setfont newpath 1 u 450 u moveto (Hello world!) show stroke newpath 1 u 200 u moveto (This \(stuff\) was generated entirely from Perl) show stroke 0 0.8 0 setrgbcolor 50 u 50 u 150 u 150 u box stroke 1 1 0.2 setrgbcolor 100 u 100 u 50 u circle fill 0 0 0.8 setrgbcolor newpath 100 u 100 u moveto (This is a test) dup stringwidth pop 2 div neg 0 rmoveto show % A simple arc newpath 300 300 50 0 90 arc closepath stroke % A arc between 2 lines % giving the appearance of a rounded corner newpath 400 400 moveto 400 410 lineto 400 420 410 420 10 arct 420 420 lineto stroke % An example of a box in a dropout colour newpath 500 500 moveto 0 20 rlineto 20 0 rlineto 0 -20 rlineto closepath 1 1 1 setrgbcolor fill /Arial findfont 20 scalefont setfont 510 500 moveto 0.6 0.6 0.4 setrgbcolor 0 0.8 0 setrgbcolor 0 u 180 u 20 u 160 u box stroke 22 u 180 u 42 u 160 u box stroke 44 u 180 u 64 u 160 u box stroke /Arial findfont 18 scalefont setfont 0 0 0.8 setrgbcolor newpath 10 u 163 u moveto (B) dup stringwidth pop 2 div neg 0 rmoveto show newpath 32 u 163 u moveto (O) dup stringwidth pop 2 div neg 0 rmoveto show newpath 54 u 163 u moveto (X) dup stringwidth pop 2 div neg 0 rmoveto show /Arial findfont 12 scalefont setfont 0.8 0 0 setrgbcolor newpath 10 u 350 u moveto (My address is:) show stroke newpath 10 u 330 u moveto (HELLO) show stroke %%EOF