Category : Printer Utilities
Archive   : PSFONTS.ZIP
Filename : SHOWFONT.PS

 
Output of file : SHOWFONT.PS contained in archive : PSFONTS.ZIP
%!
% PostScript file to print the fonts available on the system.
%

/FontList [ FontDirectory {pop} forall ] def
/b 256 string def
/b1 256 string def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Shellsort for postscript programs. Takes an array and a "le" comparitor
% procedure and sorts the array in place. Returns the array:
%
% array proc SSort array
% -----
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

10 dict begin
/sd currentdict def

/SSort
{
//sd begin
/comp exch def
/a exch def
/N a length def
/h 1 def
{/h h 3 mul 1 add def h N gt {exit} if} loop
{
/h h 3 idiv def
h 1 add 1 N
{
/i exch def
/v a i 1 sub get def
/j i def
{
/nj j h sub def
/cur a nj 1 sub get def
cur v comp {exit} if
a j 1 sub cur put
/j nj def

j h le {exit} if
} loop
a j 1 sub v put
}
for
h 1 eq {exit} if
} loop
a
end
}
end
bind def

%
% Sort Fontlist
%

FontList {b cvs exch b1 cvs ge} SSort

%
% Build Strings
%

/s1 48 string def
/s2 51 string def
/s3 53 string def
/s4 31 string def

/putchar % string i --- string
{
/i exch def dup i offset sub substr add i put
} def

s1 /substr 0 def 65 dup /offset exch def 1 90 {putchar} for
/substr 26 def 33 dup /offset exch def 1 47 {putchar} for
/substr 41 def 58 dup /offset exch def 1 64 {putchar} for pop

s2 /substr 0 def 97 dup /offset exch def 1 122 {putchar} for
/substr 26 def 48 dup /offset exch def 1 57 {putchar} for
/substr 36 def 123 dup /offset exch def 1 126 {putchar} for
/substr 40 def 161 dup /offset exch def 1 171 {putchar} for pop

s3 /substr 0 def 172 dup /offset exch def 1 224 {putchar} for pop

s4 /substr 0 def 225 dup /offset exch def 1 255 {putchar} for pop

%
% Show Fonts
%

/fontname 50 string def
/xloc 120 def
/yloc 760 def

/title
{
/Helvetica findfont 12 scalefont setfont
fontname cvs dup = flush show
/yloc yloc 20 sub def
xloc yloc moveto
} def

/moveit
{
/yloc yloc 14 sub def xloc yloc moveto
} def

/printout
{
dup title findfont 10 scalefont setfont
s1 show moveit s2 show moveit s3 show moveit s4 show
} def

72 720 moveto

FontList
{
/yloc yloc 40 sub def
yloc 80 lt {showpage /yloc 720 def} if
xloc 70 sub yloc moveto
printout
} forall

showpage
clear


  3 Responses to “Category : Printer Utilities
Archive   : PSFONTS.ZIP
Filename : SHOWFONT.PS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/