%!PS-Adobe-3.0 %======================================================================= % Send this file to a PostScript device to list the names of all of % the resident fonts, in ascending order. %======================================================================= %%Title: fontlist.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 /fontlistdict 50 dict def fontlistdict 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 /BaselineSkip PointSize 1.2 mul def /BottomOfColumn { y 1 inch lt } 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 /ColumnOffPage { x ColumnWidth add 7.5 inch gt } 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 def /Y y def x y moveto } def end % fontlistdict %%EndProlog %======================================================================= %%BeginSetup /#copies 1 def fontlistdict 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 %fontlistdict %%EndSetup %======================================================================= %%Page: 1 1 %%BeginPageSetup fontlistdict begin NewPage end % fontlistdict %%EndPageSetup fontlistdict begin % Display the sorted fonts: this make take several pages /n 0 def /nstr 10 string def FontArray { /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 } 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 % fontlistdict showpage %%PageTrailer %======================================================================= %%Trailer %%EOF