[gs-devel] new fontmap utility

rmm rmm at cynexus.net
Sat May 11 10:43:43 PDT 2002


Hi there

Thanks for your consideration. I'm, by the way not trying to sell something, here :-)
I simply thought that GS related tools should be available in that environment
rather than somewhere in the wild. Actually, it didn't even come to my mind to
see it included in the GS distribution athough I'm pleased to see that considered.

Four points, that I feel should bee seen/considered:

- As Peter correctly states, GS does have very similar capabilties built in.
But, if I may take myself as average (as opposed to professional or newbie)
example: I *did* look through the excellent GS documentation but I did it
with the eyes of a non-expert and it didn't strike me that my problem (to
have GS know about type1 font outside of its directory) was already solved.

- Googleing for that problem (e.g. ghostscript fonts adding) brought up
a whole lot of other people with the same or very similar problems. This
is, with all respect, not the only case where GS provides a nice service
many (most ?) users don't know about. I remember myself editing "fonts.dir"
because I thought it was necessary for GS rather than simply being a courtesy
towards X.
Again: This is somewhere in the documentation. But, how many network engineers,
secretaries, book-keepers will read the whole vast documentation of something
they consider as part of the printer driver and not as an application they 
actually work (interact) with ?

- We shouldn't underestimate the "interpreter" vs "compiler" issue, i.e. scanning
all those directories at each GS start vs. having it done once. Let us not forget
that GS, unlike e.g. Gimp, isn't an application that we keep open on our desktops
but rather something that might well come up dozends of times a day.

- Unlike Peter I don't see a tool like gsfontmap as a potential hassle for
admins (I happen to be one :-) but as a plus. Font-providers or admins would
have a simple and predictable way to include it in their font-packs (installation
scripts). In fact, I personally plan to include it in our inhouse Linux 
distribution in order to have the usual font locations (staroffice, X, ...)
automatically resolved and to have a simple way to add our standard set
of fonts.

For fairness sake: gsfontmap does *not* support TTF and does probably *not* 
(nor plan to) support Windows. It would need considerable friendly forces
persuading me into doing that.
----------------

It might interest you that I plan to enhance gsfontmap in three ways:

- I will make it look for doublettes (x, e.g. adds a second Courier)
- I will make it generate aliases. Staroffice, for example, seems to
generate PS with FontNames that use a lot of '_' underscores. (e.g.
"/Courier_Bold" instead of "/Courier-Bold")
- I will make it list all available Families, possibly with styles.

Thanks for your interest

Ramon Mall
rmm AT cynexus.net

-- Want to be secure ? Close your Windows ! --

On Sat, 11 May 2002 07:37:13 -0700
"L. Peter Deutsch" <ghost at aladdin.com> wrote:

> > You call it something like "gsfontmap.py /foo/bar/16tons/*.afm" and it
> > outputs the proper Fontmap.GS lines (along with a little comment header
> > and finally a success line (to stderr))
> 
> This is a nice utility.  However, Ghostscript already has a built-in
> facility for doing something very similar.  If you set GS_FONTPATH to a list
> of directories, Ghostscript will scan those directories for .pfa, .pfb,
> .ttf, and other recognized font formats, and will build the equivalent of
> the Fontmap dynamically.  This has been implemented for many years and is
> documented in doc/Use.htm.
> 
> The tradeoff is that GS_FONTPATH does require scanning the directory, and
> does require opening each possible font file to make sure that it is, in
> fact, a font file.  Ghostscript does this only once per run, and only if it
> can't find a requested font using the Fontmap, but it does take some time.
> Generating a Fontmap in advance is obviously more efficient, but the user or
> system administrator must remember to run the utility whenever a font is
> installed or uninstalled.
> 
> -- 
> 
> L. Peter Deutsch     |    Aladdin Enterprises   |  203 Santa Margarita Ave.
> ghost at aladdin.com    |  http://www.aladdin.com  |  Menlo Park, CA 94025
> 
>    No government censorship of software!  Oppose the CBDTPA!  www.eff.org
> 



More information about the gs-devel mailing list