Ghostscript: how do I find out what fonts are available?

In Ghostscript, on a windows xp pc with an inkjet printer, how can I see a sample of the fonts available on my system? I need to know what they are called to invoke them, and it would be useful to know what substitutions are made.


Solution 1:

(*) {==} 256 string /Font resourceforall will pipe a list of all the fonts available to stdout.

Instead of a simple {==} for the proc argument to resourceforall you could supply a more complex routine to print a page of output using the font. Eg:

%!
(*) {cvn findfont 20 scalefont setfont
10 10 moveto (ABCDEFGHIJKLMNOPQRSTUVWXYZ) show showpage}
256 string /Font resourceforall

Or even:

%!
(*) {dup cvn findfont 20 scalefont setfont
10 100 moveto show 
10 10 moveto (ABCDEFGHIJKLMNOPQRSTUVWXYZ) show showpage}
256 string /Font resourceforall

You can make it as pretty as you like, or until you get bored.....

Solution 2:

It is there in the book I am using, to learn from and as a reference: "Postscript by Example" by Henry McGilpin and Mary Campione, Addison Wesley, 1992; ISBN 0-201-63228-4, Chapter 14 page 553, which has a dozen or so pages, 6 plus programs, on this very subject.

I got a download of the programs from the site and the file labelled "FONTS6.PS" is exactly what I want.