From: ib@ivan.esd.sgi.com (Ivan Bach)
Subject: Re: Font Manager (long)
Followup-To: <1992Sep7.142540.11890@aio.jsc.nasa.gov> 
Organization: Silicon Graphics, Inc., Mountain View, CA
Date: Mon, 7 Sep 1992 20:48:15 GMT

In article <1992Sep7.142540.11890@aio.jsc.nasa.gov>, taylorf@sweetpea.jsc.nasa.g
ov (Frank S. Taylor IV 283-4278) writes:
>> The IRIS Font Manager in IRIX 4.0.5 and higher can use outline fonts ...
> Are there more extensive notes on these changes than those found in the
> release notes?
I prepared a paper called "Font Technologies" for the 2nd SGI Developer's
Forum.  In that paper I said that last year outline fonts were used only by
Display PostScript (DPS), and that the use of outline font files will probably
soon spread to the IRIS Font Manager, X Window System, and application
programs.  That paper also contained detailed instructions on how to add 
bitmap and outline fonts to an SGI system, how to find out which outline fonts 
are built into a PS printer, how to download additional outline fonts to that
printer, etc.  If you want to develop programs for SGI systems, you may want
to join one of the SGI programs for developers.

> I'd like to know more about how to take advantage of these changes.
When you install the subsystem eoe2.sw.Xfonts in IRIX 4.0.5 or higher, the
Adobe outline font files:

    Utopia-Bold
    Utopia-BoldItalic
    Utopia-Italic
    Utopia-Regular

are stored in the directory /usr/lib/DPS/outline/base, while the corresponding
Adobe Font Metric (AFM) files are installed in the directory /usr/lib/DPS/AFM.
Since that subsystem is usually installed by default, your program could treat
these four outline fonts as default fonts which are almost always available.

When you install Display PostScript (DPS) in IRIX 4.0 or higher, 13 more Adobe
outline font files are stored in the directory /usr/lib/DPS/outline/base,
while the corresponding Adobe font metric (AFM) files are stored in the
directory /usr/lib/DPS/AFM.  You can use the PS demo program Fontview to see
which outline fonts are available, and what they look like.  The basic 13
fonts which come with DPS are usually built into PS printers, so there is no
need to download them.  Utopia fonts are usually not built into PS printers.
 
The IRIS FM in IRIX 4.0.5 and higher uses outline font files to produce a
bitmap font when it cannot find a bitmap font for a requested point size
within a certain tolerance.

If you use a text editor to look at an outline font file that SGI ships, you
will see that it is a PostScript (PS) program.  Outline fonts are used by
programs which know how to interpret PS code.  An application program that
does not know how to interpret PS code, can check whether the DPS extension
of the X server is available, and use DPS to interpret PS code (see the demo
program dpsglx that you can get from the directory sgi/src/dpsglx on sgi.com
by ftp).  That would allow your program to, for example, import Encapsulated
PS files.

You don't need outline font files to generate PS code for a PS device.  Your
program can use the information stored in AFM files to generate PS code.  You
can get sample code for the parsing of AFM files by sending the message:

    Subject: send Programs parseAFM.shar

to ps-file-server@adobe.com.  You can get a description of the AFM 3.0 format
by sending the message:

    Subject: send Documents AFMformat3.0.ps

to that server.

The SGI Inventor uses bitmap fonts for 2D text, and outline fonts for 3D text.
You can use that 3D toolkit to take advantage of outline fonts.

> was it intended to make these changes transparent to the user?
We knew that there would be some changes in fonts that could not be avoided,
because the IRIS FM started using new algorithms to scale bitmap fonts, and
to produce bitmap fonts from character outlines.  Every effort was made to
minimize those changes.  It is very difficult to improve the processing of
fonts in a font manager, without making some changes to the font information
passed to the programs that use that font manager.  For example, your program
may get a font which was previously not available.  You could get the same
kind of effect by adding bitmap fonts.

Ivan Bach, ib@sgi.com