%!PS-Adobe-3.0 %======================================================================= % Send this file to a PostScript device to list the names of all of % the resident fonts, in ascending order, together with a small sample % of each font. %======================================================================= %%Title: fontshow.ps %%CreationDate: Thu Dec 15 09:31:00 MST 1994 %%Creator: Nelson H. F. Beebe %%For: Nelson H. F. Beebe %%BoundingBox: 0 0 612 792 %%DocumentMedia: A 612 792 () () () %%DocumentData: Clean7Bit %%DocumentFonts: font Courier Times-Bold %%DocumentNeededResources: font Courier Times-Bold %%DocumentSuppliedResources: %%Orientation: Portrait %%PageOrder: Ascend %%Pages: 1 % NB: The number of pages depends on the number of resident fonts %%EndComments %======================================================================= %%BeginProlog /fontshowdict 50 dict def fontshowdict begin /inch { 72 mul } def /PointSize 10 def /ColumnWidth 3.24 inch def % slightly less than (8.5 - 2)/2 /Courier findfont PointSize scalefont setfont /BaselineSkipFactor 1.2 def /BaselineSkip { PointSize BaselineSkipFactor mul } def /BottomOfColumn { y 1 inch lt } def /ColumnOffPage { x ColumnWidth add 7.5 inch gt } def /Bubblesort % Here is the sorting routine, courtesy of ulfis@nada.kth.se { % Usage: array Bubblesort % This code may be used for arrays of strings and arrays of numbers /TheArray exch def /num TheArray length def num 1 gt { 1 1 num 1 sub { /localcount exch def num 1 sub -1 localcount { /innercount exch def /firststring TheArray innercount 1 sub get def /secondstring TheArray innercount get def firststring secondstring gt { TheArray innercount 1 sub secondstring put TheArray innercount firststring put } if } for } for } if } def /ColumnSpaceCheck { % Usage: vertical-space-needed ColumnSpaceCheck y exch neg y add /y exch def BottomOfColumn { pop NewColumn } { /y exch def } ifelse } def /FontShow { % Usage: fontname FontShow currentfont exch findfont 0.8 PointSize mul scalefont setfont (ABCDEFGHIJKLMNOPQRSTUVWXYZ) show NewLine (abcdefghijklmnopqrstuvwxyz) show NewLine (0123456789 !@#$%^&*()_+|~-=\\`{}[]:";'<>?,./) show NewLine (The quick brown fox jumps over the lazy dog.) show NewLine NewLine setfont } def /NewColumn { /x x ColumnWidth add def /y Y def ColumnOffPage { showpage NewPage } if x y moveto } def /NewLine { /y y BaselineSkip sub def BottomOfColumn { NewColumn } if x y moveto } def /NewPage { /x 1 inch def /Y 10 inch PointSize BaselineSkipFactor mul sub def % top of column /y Y def x y moveto } def end % fontshowdict %%EndProlog %======================================================================= %%BeginSetup /#copies 1 def fontshowdict begin % Count the fonts available, while putting all of the font names on % the stack. We need to create a new string for each of them, because % scratch gets reused on each loop iteration. /n 0 def systemdict /resourceforall known { % Level 2 PostScript /scratch 256 string def (*) { /n n 1 add def dup length string cvs } scratch /Font resourceforall } { % Level 1 PostScript FontDirectory { pop /n n 1 add def dup length string cvs } forall } ifelse % Make an array to hold the font names and then store them from the stack /FontArray n array def FontArray astore % Sort the font array (astore left FontArray on the stack) Bubblesort end %fontshowdict %%EndSetup %======================================================================= %%Page: 1 1 %%BeginPageSetup fontshowdict begin NewPage %%EndPageSetup % Display the sorted fonts: this make take several pages /n 0 def /nstr 10 string def FontArray { dup BaselineSkip 2 mul BaselineSkip 0.8 mul 5 mul add ColumnSpaceCheck /n n 1 add def n 10 lt { ( ) show } if n 100 lt { ( ) show } if n 1000 lt { ( ) show } if n nstr cvs show (: ) show show NewLine cvn FontShow } forall /Times-Bold findfont PointSize scalefont setfont (Total memory: ) show vmstatus 40 string cvs show NewLine (Memory used: ) show 40 string cvs show NewLine pop % discard 3rd vmstatus value (Free memory: ) show vmstatus exch sub 40 string cvs show NewLine pop % discard 3rd vmstatus value end % fontshowdict showpage %%PageTrailer %======================================================================= %%Trailer %%EOF