		Installing PostScript fonts into Display PostScript
		---------------------------------------------------

Introduction
------------
The X-windows server provided by DEC as part of their DECwindows/Motif layered
product on VMS supports the Display PostScript server extensions (DPS).  These
allow programs to use PostScript commands to render graphics to the workstation
screen.

Laser-Scan's LAMPS products take advantage of this facility to allow maps and
charts to be drawn using industry-standard PostScript fonts.  These fonts are
read by the X-server, and as such have to be in the correct format, have the
correct names, and live in the correct directories to work.

Fonts for use in this way should be in the Adobe Type1 format, in ASCII (not
binary) form.  This format is commonly called PFA format.  An associated AFM 
file (Adobe Font Metrics file) is also needed. A good font supplier should be 
able to provide fonts in the correct format (often described as being for Unix 
systems).

Microsoft Windows however uses a variant of Type1 in which the font glyph data
is encoded in binary form. This is called PFB format. It may well be that font 
suppliers are more familiar with providing fonts in this format. Apple Mac 
computers use yet another variant of the Type 1 format.

The process of loading fonts from whatever source for use by Display PostScript 
is not specific to Laser-Scan. You would do the same steps if the fonts were to 
be used by any Motif application using DPS (eg the DEC CDA viewer). However it 
doesn't seem particularly well documented in any of the DEC documentation we 
have seen, so these notes are intended to guide you through the process.


Getting PFA Fonts
-----------------
If you have a Type1 font in PFB format and you need it in PFA for use by DPS,
then there are various ways of doing this (assuming you have a license to use
the font legally on this CPU):

1) Go back to your font supplier and ask for it to be supplied in Type1 PFA
   format.  This is often the best method! They will have proper tools (such as 
   the commercial `Fontographer' program to do the necessary conversions.

2) On a Microsoft Windows PC, print a small document using the font using the
   PostSCript printer driver, with output going to a file (rather than a COM
   port). Then edit the resultant file with a text editor to extract the font
   definition section.  While doing this, ensure that there are appropriate line
   terminator characters (CR) at the end of each PostScript line, and every 80
   characters through the hexadecimal encoded data.

3) Use a conversion tool, such as the program `t1ascii' in the public domain
   `t1utils' package.  Laser-Scan can provide this program as an unsupported
   utility.  To assist in using this program, a Laser-Scan command procedure
   `PFB_TO_PFA.COM' is also available as unsupported software.  If present on
   your system this will be available as `@LSL$COM:PFB_TO_PFA'.  Note that if
   this tool is to be used, then the original PFB file should be copied onto
   the VMS system using BLOCK mode to avoid disturbing the binary data sections.


Font directory and name
-----------------------
Having got your font in PFA format, then it needs to be put in the correct
directory which is SYS$COMMON:[SYSFONT.XDPS.USER_OUTLINE].  This directory is
owned by user SYSTEM, so that creating new fonts must be done by the System
Manager account. Note also that any new font files should have their protection 
checked to make sure that they have World:Read access allowed.

It is also important that the file has the correct name, which is made up from
the full PostScript font name (usually with `--' signs between the words), and
extension of `.XDPS$OUTLINE', eg `TIMES-ROMAN-BOLD.XDPS$OUTLINE'.

It is also important that the font file has the correct record format (as shown
by DIRECTORY/FULL). This should be `Stream_LF'. A Laser-Scan command procedure
`PFA_TO_XDPS.COM' to help with these steps is also available as unsupported
software. If present on your system this will be available as
`@LSL$COM:PFA_TO_XDPS'. 


Font Metrics Files
------------------
As well as the font file itself (which is read by the X-server), a second file
is needed which is read by applications software to get character size
information.  These files are known as AFM files (Adobe Font Metrics).  You
must ensure that you get one (or more than one if you need multinational
characters - see below) of these files with the PFA or PFB file from your font
supplier.  AFM files are plain ASCII text, so no conversion is needed. 

Having got your AFM file, then it needs to be put in the correct directory
which is SYS$COMMON:[SYSFONT.PS_FONT_METRICS.USER]. This directory is owned by
user SYSTEM, so that creating new fonts must be done by the System Manager
account. Note also that any new AFM files should have their protection 
checked to make sure that they have World:Read access allowed.

It is also important that the file has the correct name, which is made up from
the full PostScript font name, but with all '-' characters replaced by '_'
characters, and extension of `.AFM', eg `TIMES_ROMAN_BOLD.AFM'.  

It is also important that the font file has the correct record format (as shown
by DIRECTORY/FULL). This should be `Stream_LF'. A Laser-Scan command procedure
`AFM_TO_XDPS.COM' to help with this is also available as unsupported software.
If present on your system this will be available as `@LSL$COM:AFM_TO_XDPS'. 

Note that if you wish to use multinational characters such as `' and `' from
the font, then you should ensure that your font provider supplies two AFM
files. One should be for the default encoding (AdobeStandardEncoding), and one
for the international standard ISO 8859-1 encoding (ISOLatin1Encoding). Both 
should be put into the usual directory as described above. The second should
be named with the suffix "_ISOLATIN1", eg `TIMES_ROMAN_BOLD_ISOLATIN1.AFM'. 

Using the new fonts
-------------------
Once the font files are in the correct format, names, and places, then they are
available to be used from from Laser-Scan LAMPS software.  The connection
between LAMPS font number and the PostScript font name is made using a
PSFONTLIST file.  Refer to the Laser-Scan documentation for the MAPPING package
(the FRT User Guide) for information on PSFONTLIST commands.



Paul Hardy
Chief Programmer
29/9/94, updated 27/11/95.
