% ============== YOUR POSTSCRIPT SOURCE FILE ENDS HERE ================ % fluthome % send fluterwumper home % flutquit % eject job or clean up or whatever flush % MUST clear print buffer (!) dest closefile % MUST close output file end % MUST close flutproc dictionary (!) % ////////// (N) GENERATE TEST FILE - ACCURATE CIRCLE ///////////// % The full flutdict definitions above are needed in the file or run % as a prefile before this code can be run. flutdict begin % open flutterwumper dictionary % Always use "\\" when you mean "\" in a PostScript filename string! /destfilename (C:\\tomj\\projects\\xyzada~1\\XYZcirc.out) def /inch {72 mul} def /flutres 0.01 inch def % set DEVICE DEPENDENT output resolution destfilename (w) file % create an output file /dest exch store % A flutfile permits a comment header. Eventually standards similar to % .eps file headers can be used. For now, just say something... ( %! flut3.0 Synergetics % Three inch circle at 100 DPI % demo002.txt v 3.0 DEL 7-24-97 ) writecr1 flutbegin % initialize flutterwumper fluthome % home flutterwumper to x=0 y=0 % ============= YOUR POSTSCRIPT SOURCE FILE STARTS HERE =============== % ============= MUST NOT INCLUDE SHOWPAGE, QUIT, ETC... =============== newpath /inch {72 mul} def 2 inch 2.5 inch 1.5 inch 0 360 arc % define circle closepath % and close stroke % and convert % ============== YOUR POSTSCRIPT SOURCE FILE ENDS HERE ================ fluthome % send fluterwumper home flutquit % eject job or clean up or whatever flush % MUST clear print buffer (!) dest closefile % MUST close output file end % MUST close flutproc dictionary (!) % /// (P) FLUTFILE ANALYZER/EMULATOR/READER/RETOUCHER/DEBUGGER ///////////// % (ALSO DISPENSES SOFT ICE CREAM) % /readflutfile reads a flutterwumper file and plots it back as PostScript. % This is useful for proof checks and to magnify closure and error details. % /readflutfile also can serve as an emulator and debugger during % flutterwumper hardware development. It may also be used to manually % "retouch" or otherwise "optimize" low resolution typography. % This version reads a disk based flutfile. Send it to the Acrobat % Distiller to generate a .PDF file. .PDF is recommended because of % its ease of magnification. % This does not yet include microsizing, tool allowances or home offset. % Repeat commands are not yet implimented 100 dict /flutreader exch def flutreader begin /xoffset 100 def % zero x position on page /yoffset 100 def % zero y position on page /upmode true def % initialize up-down mode /nocomment true def % initialize comment mode /inch {72 mul} def % inch scaling /flutres 0.01 inch def % current resolution of flutfile /penwidth 0.5 def % pen linewidth in points /showaxisflag true def % show 0-0 axis? /xaxislength 5 inch def % length of x axis /yaxislength 4.5 inch def % length of y axis /showgridflag true def % show a layout grid? /gridblock 0.1 inch def % small grid block size /gridblockx 1 inch def % large grid block size /black {0 0 0 setrgbcolor} def /green {0 1 0 setrgbcolor} def /red {1 0 0 setrgbcolor} def /blue {0 0 1 setrgbcolor} def systemdict /setstrokeadjust known {true setstrokeadjust} if % for video 256 array /flutcommandset exch def % build an array of all characters 0 1 255 {flutcommandset exch {} put} for % fill it with null procs (0) 0 get flutcommandset exch {nocomment {!E} if} put % stuff commands (1) 0 get flutcommandset exch {nocomment {!NE} if} put (2) 0 get flutcommandset exch {nocomment {!N} if} put (3) 0 get flutcommandset exch {nocomment {!NW} if} put (4) 0 get flutcommandset exch {nocomment {!W} if} put (5) 0 get flutcommandset exch {nocomment {!SW} if} put (6) 0 get flutcommandset exch {nocomment {!S} if} put (7) 0 get flutcommandset exch {nocomment {!SE} if} put (D) 0 get flutcommandset exch {nocomment {!D} if} put (U) 0 get flutcommandset exch {nocomment {!U} if} put (H) 0 get flutcommandset exch {nocomment {!H} if} put (B) 0 get flutcommandset exch {nocomment {!B} if} put (Q) 0 get flutcommandset exch {nocomment {!Q} if} put (%) 0 get flutcommandset exch {!com} put 10 flutcommandset exch {!ret} put % stuff control commands 13 flutcommandset exch {!ret} put % file insertable error trapper. Placing ! in the flutfile executes % custom code named debug. Like a trap or break... (!) 0 get flutcommandset exch {nocomment {debug}if} put % debugger % action commands... /!H {0 0 moveto} def % XY home startup /!com {/nocomment false def} def % start comment mode /!ret {/nocomment true def} def % reset comment mode /!D {/upmode false def} def % pen down /!U {/upmode true def} def % pen up /!go {upmode{rmoveto}{rlineto % action selector currentpoint stroke moveto}ifelse} def /!E {1 0 !go} def % go east one step /!NE {1 1 !go} def % go northeast one step /!N {0 1 !go} def % go north one step /!NW {-1 1 !go} def % go northwest one step /!W {-1 0 !go} def % go west one step /!SW {-1 -1 !go} def % go southwest one step /!S {0 -1 !go} def % go south one step /!SE {1 -1 !go} def % go southeast one step /!Q {} def % end of flutfile quit /!B {} def % flutterwumper setup % optional axis shower... /showaxis {showaxisflag {gsave green 1 setlinecap 2 setlinewidth gsave 0 0 moveto 0 yaxislength rlineto xaxislength 0 rlineto 0 yaxislength neg rlineto 0.92 1 0.92 setrgbcolor fill grestore 0 inch -0.1 inch moveto 0 yaxislength 0.2 inch add rlineto stroke -0.1 inch 0 moveto xaxislength 0.2 inch add 0 rlineto stroke grestore}if} def % optional fine grid shower... /showfinegrid {showgridflag{ gsave green 1 setlinewidth gsave xaxislength gridblock div 1 add cvi {0 0 moveto 0 yaxislength lineto stroke gridblock 0 translate} repeat grestore gsave yaxislength gridblock div 1 add cvi {0 0 moveto xaxislength 0 lineto stroke 0 gridblock translate} repeat grestore grestore }if}def % optional coarse grid shower... /showcoarsegrid {showgridflag{gsave green 2 setlinewidth gsave xaxislength gridblockx div 1 add cvi {0 0 moveto 0 yaxislength lineto stroke gridblockx 0 translate} repeat grestore gsave yaxislength gridblockx div 1 add cvi {0 0 moveto xaxislength 0 lineto stroke 0 gridblockx translate} repeat grestore grestore}if}def % this processes one flutfile line /procflutline {{flutcommandset exch get cvx exec} forall} def % this processes the entire flutfile /scanflutfile {black {source 128 string readstring {procflutline} {procflutline exit}ifelse} loop } def % an annotator... /graphtitle {gsave black xoffset yoffset translate /Helvetica-Bold findfont 12 scalefont setfont 0.1 inch -0.35 inch moveto show grestore} def % this does it all... /readflutfile { save /flutsnap exch store (r) file /source exch store % create read file xoffset yoffset translate % set initial page position showaxis % optionally show axis showfinegrid % optionally show layout grid showcoarsegrid penwidth setlinewidth % set pen width flutres dup scale % set flutres resolution % and magnification scanflutfile % extract flutfile commands flutsnap restore } def end % close flutreader dictionary %%%%%% Demo - remove or alter before reuse %%%%%%%%%%%%%%%%%%%%%%%%% flutreader begin /debug {currentpoint zowie} def % optional debugger % This example produces one PDF file of five pages. Each can % be individually magnified for detail, etc... newpath black 0.25 setlinewidth (A:\\demo0001.txt) readflutfile % read selected flutfile (A simple 100 DPI rectangle.) graphtitle % annotate it showpage % advance to next page black 0.25 setlinewidth (A:\\demo0002.txt) readflutfile % read selected flutfile (A medium sized 100 DPI circle.) graphtitle % annotate it showpage black 0.25 setlinewidth (A:\\demo0002.txt) readflutfile % read selected flutfile (100 DPI circle and tolerance limits. Use high magnification.) graphtitle % annotate it % plot an original overlay tolerance window for comparison. % NOTE: takes *extreme* PDF magnification to view tolerance... red 0 setlinewidth gsave xoffset yoffset translate 2 inch 2.5 inch 1.5 0.007 add inch 0 360 arc closepath stroke 2 inch 2.5 inch 1.5 0.007 sub inch 0 360 arc closepath stroke grestore showpage % advance to next page black 1 setlinewidth (A:\\demo0003.txt) readflutfile % read selected flutfile (Palatino "R" at 100 dpi.) graphtitle showpage black 0.25 setlinewidth (A:\\demo0003.txt) readflutfile % read selected flutfile (Palatino "R" accuracy comparison. Use high magnification.) graphtitle gsave red 0.001 setlinewidth xoffset yoffset translate /URWPalladioL-Bold findfont 100 scalefont setfont % NEED VALID FONT HERE 100 200 moveto (R) false charpath 0.001 setlinewidth stroke grestore showpage black 1 setlinewidth (A:\\demo0004.txt) readflutfile % read selected flutfile (Hand retouched 100 DPI "R".) graphtitle showpage end % close flutreader dictionary %%%%%%%%%%%%%%%%%%%%%%% Further Comments %%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Note also that no matter what you do, running a small character of a fancy % font at low resolution will look less than stunning. But you can take % the stock Palatino "R" above, and "retouch" your flutfile. For instance, % the left foot can be flattened by replacing 0000000100 with 0000000000 and % 0000000070 with 0000000000. The small tic at the top inside of the R bowl % may be eliminated by replacing the 00001 and 0070 with 00000 and 0000. The % "byte" at the upper right can be improved by replacing the 33 44 43 with % 33 43 44, and so on. % With some practice, a flutfile can easily be "sight read". Try it. % Note that "%" comments may be inserted anywhere in a flutflie as markers % or reminders. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % GURU's LAIR VOICE HELPLINE % ========================== % % A no charge Guru's Lair voice helpline is avilable for your use % for technical information, referral to qualified consultants, and for % off-the-wall networking in general. % % Best calling times are 8-5 weekdays MOUNTAIN STANDARD TIME year around. % Please, US calls only. % % Phone or write your flutterwumper questions to: % % Don Lancaster % SYNERGETICS % Box 809-GL % Thatcher, AZ, 85552 % % (520) 428-4073 % % Or visit the www.tinaja.com website. % % Questions may also be emailed to don@tinaja.com % % Full consulting and PIC development services available. % A free TECHNICAL INSIDER SECRETS catalog is also available. % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%%%%%%%%%%%% END PS FLUTTERWUMPER UTILITIES %%%%%%%%%%%%%%%%%%%%%% % Consulting services available on concepts shown. % =================================================================== % Copyright c 1997 by Don Lancaster and Synergetics, Box 809, % Thatcher AZ, 85552. (520) 428-4073 www.tinaja.com don@tinaja.com % All commercial rights and all electronic media rights are % *fully* reserved. Linking welcome. Reposting expressly forbidden. % ===================================================================