%! % % Creates a page with the names of all the fonts in the printer, % each font name being shown in that font. % Also prints a column of font "signatures". % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Prepare to print list (select font, position cursor) 72 770 moveto % Sort Routine in PostScript (R) % % by Andrew Marc Greene % Dec. 1987 % % [PostScript is a trademark of Adobe Systems, Inc.] % % Initialize num, which will contain number of items to sort /num 0 def % Get list of items to sort FontDirectory { pop /st 70 string def /num num 1 add def st cvs } forall %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Sort Routines % Compare top element to current "best" % If top element is "better," switch them, % otherwise leave top element on top; % then roll the stack /OneComp { /elt exch def elt best gt {best /best elt def} {elt} ifelse n 1 roll } bind def % Go through n items one time, leaving "best" item on bottom % Then decrement n and, if n>0, recursively call NComp /NComp { /best exch def /n n 1 sub def 1 1 n {pop OneComp} for best n 1 add 1 roll n 0 gt {NComp} if } bind def % Initialize n to the number of elements to sort (num) % and begin the sort /n num def NComp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % font-show % Passed a string (the name of a font), % Displays that string in its own font ("size" scale) /size 20 def /fshow { dup cvn findfont size scalefont setfont show } bind def /oldtype 0 def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /sigspot 450 def /fontsig (Hamburg) def % Font "signature". The orgin of this is lost in the mists of time % Display the sorted elements 1 1 num {pop dup dup 1 get exch 2 get 256 mul add /newtype exch def newtype oldtype ne { 0 -15 rmoveto /oldtype newtype def} if % make spaces between different font families currentpoint 3 -1 roll fshow % show font name currentpoint exch pop sigspot exch moveto % move to point to show signature fontsig show % show it size sub moveto % next line } for showpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % /mit/amgreene/PS/dictshow.ps % by Andrew Marc Greene Dec 1987 % End of File %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% .