Newsgroups: comp.windows.ms
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!linus!linus!mwunix.mitre.org!jcmorris
From: jcmorris@mwunix.mitre.org (Joe Morris)
Subject: Re: Windows not auto-downloading softfonts
Message-ID: <jcmorris.676213303@mwunix.mitre.org>
Sender: news@linus.mitre.org (News Service)
Nntp-Posting-Host: mwunix.mitre.org
Organization: The MITRE Corporation, Bedford MA
References: <1991Jun3.210027.118@ux1.cso.uiuc.edu> <390@dosbears> <1991Jun5.192745.1945@>
Date:  6 Jun 91 13:01:43 GMT

sw@ (Steve Warner) writes:

>How to get windows to automatically download soft fonts..  And yes,
>it works fine with w4w.

>Weather or not you use ATM, the postscript driver must be set up
>correctly to handle this.  Fonts must be installed with the postscript driver
>in win.ini.

>Each font must have a number, they start from
>1 and go up, the pathname and filename of the metrics file, followwed
>by a semi, then the name of the printer font.  

A slight expansion on the above comments...

Printers which support downloadable fonts such as PostScript or PCL printers
need to be able to tell Windows three things:

   - The name of the typeface (and its family)
   - The size (height and width) of each character
   - What (if anything) to send to the printer to perform the download

The character size is necessary to permit a program to determine where line
breaks are needed since there is no absolute relationship between the height
(point size) of a font and the width of any specific character.  (In fact,
the TmsRmn typefaces in the K and Z cartridges have different widths in each
size!)

The drivers do this using the SoftFontxxxxx= lines of WIN.INI to communicate
this data to the printer drivers.  'xxxxx' can be between 1 and 32768 (?)
for a PCL printer (its value becomes the "font number" in the printer); I'm
not sure what the limits are for PostScript.  The numbers need not be
contiguous; in fact they will not be if you use the Soft Font Installer to
delete a font from the middle of an otherwise congiguous sequence.  I use
this to help manage the (far too many) fonts I keep in WIN.INI by grouping
typefaces into blocks of numbers: 100-149 for TmsRmn; 200-249 for Helvetica,
etc.

The syntax of the SoftFontxxxx statement is:

  SoftFontnnnn = pfm.file.name  [ ;soft.font.file.name ]

(extra spaces for readability here only)  The first parameter is the PFM
(Print Font Metrics) file which contains information about the size of
the characters covered in this soft font.  It is the existence of this
file which tells Windows applications that this particular font is available
for use, and what its name is.

The second parameter, if it is present, tells the printer driver that
whenever a print event is begun which requires this particular font, the
file named here must be downloaded to the printer.  For PCL printers 
the HPPCL.DRV code first sends a PCL order which tells the printer that
it is about to receive soft font number nnnn (the number from the SoftFontnnnn
keyword), then sends the named file.

If the second parameter is absent, then Windows assumes that the printer
has already been loaded with this font, and the Windows printer driver
has no responsibilty for downloading the font.

If you use the Soft Font Installer to add a PCL font to Windows (I don't
have enough experience with PostScript soft fonts to address them) then
the installer reads the font file and creates the necessary PFM file;
the WIN.INI file entry is then created using the lowest unused value for
nnnnn and both the PFM and font file names are placed on the line.
If you check the "permanent font" box (now, or at some later time) the
second parameter (the font file name) is removed from the entry and is
stashed elsewhere in the printer entry of WIN.INI to allow it to be
recovered if you later declare that the font should be treated as temporary.
This is the reason you may see the soft font names on lines other than
ones starting with SoftFontnnnnn.

For an Official Microsoft Discussion (tm) see the text beginning on page
83 of the Windows Resource Kit.

Joe Morris
