Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!orchid!clyde!rutgers!lll-lcc!pyramid!oliveb!sun!falk From: falk@sun.UUCP Newsgroups: net.sources Subject: Re: GETAFM - print in PostScript fonts you never knew you had. Message-ID: <16726@sun.uucp> Date: Wed, 15-Apr-87 00:12:40 EST Article-I.D.: sun.16726 Posted: Wed Apr 15 00:12:40 1987 Date-Received: Sat, 18-Apr-87 00:18:39 EST References: <1041@byzantium.UUCP> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 90 Keywords: PostScript, Adobe Font Metics file, fonts Summary: program to display all fonts in a printer In article <1041@byzantium.UUCP>, greenber@swatsun (Peter Greenberg) writes: > > > Dear PostScriptFolk, > > The situation may arise where your PostScript device knows about fonts > that your host computer is not familiar with.... In a similar vein, here's a little toy I wrote when I was learning postscript. It goes through the printer's internal memory and gives an example of every font the printer has. For some reason it takes a while to run; probably because the printer has to scale all of its fonts. Simply print this on your postscript printer... =====================cut here========================== %! PostScript! % /Times-Roman findfont 10 scalefont setfont /inch { 72 mul } def /LM 1.0 inch def /RM 7 inch def /BM .5 inch def /TM 10 inch def /tmpstr 80 string def /xpos LM def /ypos TM def xpos ypos moveto /dy 18 def /crlf { /xpos LM def /ypos ypos dy sub def ypos BM lt { showpage /ypos TM def } if ypos xpos exch moveto } def /c-crlf { stringwidth pop currentpoint pop add RM gt { crlf } if } def /c-show { dup c-crlf show } def /putnum { tmpstr cvs c-show ( ) show } def /puttype { type tmpstr cvs c-show ( ) show } def /showfont { crlf dup findfont 15 scalefont setfont tmpstr cvs show (: ) show (ABCDEFGHIJKLMNOPQRSTUVWXYZ ) c-show (abcdefghijklmnopqrstuvwxyz ) c-show (0123456789 ) c-show (!"#$%&' ) c-show (\(\)*+,-./ ) c-show (:;<=>?@ ) c-show ([\\]^_` ) c-show ({|}~ ) c-show ( ) tmpstr copy 0 1 31 { tmpstr exch dup 8#240 add put } for tmpstr c-show 0 1 31 { tmpstr exch dup 8#300 add put } for tmpstr c-show 0 1 31 { tmpstr exch dup 8#340 add put } for tmpstr c-show crlf } def FontDirectory length (length = ) show putnum crlf crlf FontDirectory {pop showfont} forall showpage =====================cut here========================== -- -ed falk, sun microsystems, falk@sun.com terrorist, cryptography, DES, drugs, cipher, secret, decode, NSA, CIA, NRO.