Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1114
| From | John Deubert <john@acumentraining.com> |
|---|---|
| Organization | Acumen Training |
| Newsgroups | comp.lang.postscript |
| Date | 2012-11-27 11:07 -0800 |
| Message-ID | <2012112711075255785-john@acumentrainingcom> (permalink) |
| References | <87obimn41v.fsf@Compaq.site.inet> |
| Subject | Re: Getting a list of the installed fonts |
On 2012-11-24 20:23:24 +0000, Cecil Westerhof said:
> Is there a way to get a list of all the installed fonts I can use in
> postscript? Then I can make demos from all, so I can decide which ones
> I want to use.
>
> If it is important: I am working with Linux.
You can use the resourceforall operator:
(*) { = } 100 string /Font resourceforall
The above line of PostScript code will send a list of all available
fonts to stdout (the log file if you're using Distiller or GhostScript
as your interpreter). The arguments, from left to right above, are:
(*) A filter string; "*" means "include everything"
{ = } A procedure body that will be called repeatedly, once for each
Font. When executed,
the procedure will find on the stack a string containing a font name.
100 string This creates a 100-character string to be used as temporary storage
for the font names.
/Font The type of resource we are enumerating; fonts, in our case.
Note that this won't list any CIDFonts (used for Asian and other
multibyte fonts); to get a list of these, replace "/Font" with
"/CIDFont" in the above line o' code.
- John
--
========
John Deubert
Acumen Training
PostScript & PDF Engineering Classes & Consulting
www.acumentraining.com
Learn PostScript programming techniques!
Read the free Acumen Journal
acumentraining.com/acumenjournal.html
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Getting a list of the installed fonts Cecil Westerhof <Cecil@decebal.nl> - 2012-11-24 21:23 +0100
Re: Getting a list of the installed fonts Luuk <luuk@invalid.lan> - 2012-11-24 21:53 +0100
Re: Getting a list of the installed fonts Cecil Westerhof <Cecil@decebal.nl> - 2012-11-25 00:39 +0100
Re: Getting a list of the installed fonts Chris <cjl@spamcop.net> - 2012-11-24 23:39 +0000
Re: Getting a list of the installed fonts John Deubert <john@acumentraining.com> - 2012-11-27 11:07 -0800
Re: Getting a list of the installed fonts "luser.droog" <luser.droog@gmail.com> - 2012-11-27 23:59 -0600
Re: Getting a list of the installed fonts Chris <cjl@spamcop.net> - 2012-11-28 09:25 +0000
Re: Getting a list of the installed fonts jdaw1 <jdawiseman@gmail.com> - 2012-12-29 14:43 -0800
csiph-web