                How to Display All Dingbats Fonts
            From HP's Distinctive Documents Cartridge

                          by Rich Zuris

Introduction
------------

WordStar's Advanced Page Preview can display any font and 
character set for which a bitmapped PCL (HP LaserJet) font is 
available.  With HP's scalable typeface cartridges for its 
LaserJet III series is provided font support files that can be 
used with HP's TypeDirector program to build downloadable fonts, 
both bitmapped and scalable.  If you own TypeDirector and a 
scalable cartridge, the files from both can be used together to 
give you WYSIWYG display in Preview.  This procedure requires 
WordStar 6.0C or above, TypeDirector 2.0 or above, and 
FONTID.COM, a utility for changing soft font typefaces and symbol 
sets, available for free from CompuServe WordStar Forum library 4 
(Laser printers).

WordStar's Preview has a limitation of displaying only one symbol 
set of any given typeface.  The Dingbats font from HP and Agfa 
Compugraphic comes in five different character sets:  Dingbats 
100, 200, 300, Ventura, and PostScript.  If you attempt to 
display all five fonts in Preview, WordStar will show all five in 
the same manner rather than as five distinct sets.  In order to 
"trick" WordStar into displaying all five, you must modify your 
fonts to assume the identity of five distinct typefaces.  There 
is no practical limit on the number of distinct typefaces that 
Preview can display, so this method should allow you to display 
all five Dingbats fonts.  CAUTION:  While this method has been 
tested with Preview, it has NOT been tested with printing.  Using 
this "trick" on Preview may also "trick" WordStar or another 
application into printing the wrong font.  This is not a problem 
with WordStar.  WordStar limits you to displaying one symbol set 
from each unique typeface.  Any attempt to do more than that is 
"breaking the rules," and is done at your own risk.


Building Fonts
--------------

The scalable typeface cartridges from HP contain font support 
files and an Autofont program to install TFM (tagged font 
metrics) and GLUE.TXT files to your hard disk.  DO NOT use this 
program for this procedure.  You must have TypeDirector to 
generate bitmapped and scalable soft fonts (.SFP and .SFS files) 
to use in developing corresponding Preview fonts.  Owners of 
WordStar 6 can acquire a TypeDirector "Basic" kit for $15 from 
WordStar Sales, (800) 227-5609.

Install the typeface diskettes that came with your cartridge 
using TypeDirector.  Install the "Autofont Support" application 
under "Environment."  (DO NOT install "WordStar" as your 
application, because TypeDirector will NOT create the necessary 
GLUE.TXT file that WordStar 6.0C and above require for scalable 
font installation.)  Use TypeDirector to build both bitmapped and 
scalable versions of each of your five Dingbats fonts.  For the 
bitmapped versions, only one medium-sized font is necessary (14pt 
is recommended).  Preview cannot generate display fonts larger 
than 48k, so it is pointless to build large bitmapped fonts.

After building bitmapped and scalable Dingbats fonts, you should 
find the following files in your FONTS directory:

     ZDR??D1A.SFP   Bitmapped fonts (.SFP, Portrait)
     ZDR??D2A.SFP     A size code appears in place of "??"
     ZDR??D3A.SFP
     ZDR??DSA.SFP
     ZDR??DVA.SFP
     ZD100D1O.SFS   Scalable fonts (.SFS)
     ZD200D2O.SFS
     ZD300D3O.SFS
     ZDP00DSO.SFS
     ZDV00DVO.SFS

In your AUTOFONT directory, you should find the following files:

     GLUE.TXT       Font summary (ASCII)
     ZDR0000S.TFM   Tagged Font Metrics file


Changing Typefaces
------------------

It will be necessary to change typeface codes on all but one of 
your Dingbats fonts before installing them into WordStar.  Before 
doing so, make backup copies of all the files listed above.  In 
selecting "new" typeface codes, it is important to select codes 
for typefaces that you do not actually have or plan to acquire.  
The examples here will use consecutive numbers beginning with the 
normal Dingbats typeface code, which correspond to uncommon 
typefaces.  Start over with the following instructions if the 
example typeface codes present a conflict.

Make five copies of ZDR0000S.TFM in your AUTOFONT directory using 
five new names:

     ZD10000S.TFM
     ZD20000S.TFM
     ZD30000S.TFM
     ZDP0000S.TFM
     ZDV0000S.TFM

Note that the third character in each new name corresponds with 
the third character of the corresponding soft font (.SFS) 
filenames.  You will modify the typeface codes in these five TFMs 
along with the five bitmapped soft fonts.  

Next, edit GLUE.TXT in WordStar's non-document mode.  Locate the 
five entries for the Dingbats scalable fonts.  On the line 
beginning with "/tfm=" you will find the TFM filename.  Change 
the TFM filename according to the name of the SFS file on the 
line beginning with "/font file =."  For example, for the font 
ZD300D3O.SFS, change the TFM name to ZD30000S.TFM.  If you find 
only one entry for a Dingbats fonts, but it has five lines 
beginning with "/symset =," it means that you have probably 
installed the fonts with the Autofont program on the scalable 
cartridge disks rather than with TypeDirector.  Reinstall the 
fonts with TypeDirector before proceeding, or make four 
additional copies of the one Dingbats font entry, eliminating all 
but one unique "/symset" line in each one.  WordStar MUST see 
five separate entries in order to be "tricked" into building 
Preview fonts for all five symbol sets.  Save your changes and 
exit WordStar.


Modifying Soft Font Codes
-------------------------

It is imperative to choose the same new typeface code for 
corresponding bitmapped and scalable fonts.  The methods for 
changing the typeface codes differ between the two types of 
fonts.  The program FONTID.COM will be used to change the 
typeface code for the soft font files, both bitmapped and 
scalable, but Debug or another hexadecimal editor is required for 
editing the TFM files.

In both the bitmapped and scalable soft font filenames, the 
symbol set can be ascertained from the 7th character:

     1    =    Dingbats 100
     2    =    Dingbats 200
     3    =    Dingbats 300
     P    =    PostScript Dingbats
     V    =    Ventura Dingbats

In the same manner, the symbol set can be ascertained in the new 
TFM names from the 3rd character.  

Copy FONTID.COM to your FONTS directory and execute each of the 
following commands (be careful to enter the correct number of 
question marks):

     fontid  ???????2?.*  /t46
     fontid  ???????3?.*  /t47
     fontid  ???????P?.*  /t48
     fontid  ???????V?.*  /t49

These four commands will change the typeface codes of the 
Dingbats fonts with symbol sets of Dingbats 200, 300, PostScript, 
and Ventura.  The Dingbats 100 series is left with its default 
typeface code of 45, while the others are incremented from that 
point.  The alternate typefaces, however, can be changed to other 
numbers if there's a conflict with other typefaces in your 
collection.  To find out if you have other soft fonts that use 
one of these typeface codes, enter the following command in your 
FONTS directory:

     for  %f  in  (*.*)  do  fontid  %f

This command will allow you to view the current typeface code for 
ALL of your fonts to detect potential conflicts.  You can also 
use this command (changing "*.*" to "zd*.*") to view your changes 
to the Dingbats typeface codes.  You may also use this 
interactive mode to make changes to codes.


Modifying TFM Codes
-------------------

The changes made to soft font typeface codes must be made to 
corresponding TFM files.  Be sure to assign the same typeface 
code to each TFM that you assigned to its corresponding soft font 
file.  In a TFM file, the typeface code will be displayed and 
entered as the typeface code used in the above instructions plus 
4096.  For example, the original font (and the "new" Dingbats 
100) has a typeface code of 45.  In the TFM, the same code will 
be 45 + 4096, which is 4141.  Keep this in mind, especially if 
your using values other than the examples used in this document.

Before using a batch process to modify all of the TFMs, it is 
necessary to determine the location of the typeface code.  Once 
it has been located in one TFM, it can be assumed to be the same 
in all of your Dingbats TFMs, since up until this point, they are 
exact duplicates.  Use the following Debug commands to find the 
location of the typeface code:

     What you'll see            What you'll enter
     ---------------            -----------------
     C:\AUTOFONT>               debug  zd10000s.tfm
     -                          s  0  F000  '4141'
     xxxx:yyyy
     -                          q
     C:\AUTOFONT>

At "xxxx:yyyy" you will find two sets of digits and letters 
separated by a colon.  Record the second set, which is 
represented by "yyyy" in the example.  This hexadecimal number 
represents the location (offset) of the typeface code.  If Debug 
returns more than one line of "xxxx:yyyy" values, DO NOT proceed 
until you've checked with the author or another experienced user 
to find out which is the correct location.

Now that the location of the typeface code is known, create a 
NON-document (ASCII) file with the following lines:

     n  zd20000s.tfm
     l
     e  yyyy  '4142'
     w
     n  zd30000s.tfm
     l
     e  yyyy  '4143'
     w
     n  zdp0000s.tfm
     l
     e  yyyy  '4144'
     w
     n  zdv0000s.tfm
     l
     e  yyyy  '4145'
     w
     q

In each case where "yyyy" appears, substitute the value returned 
by Debug in the preceding instructions.  If you used different 
substitute typeface codes than the examples of 46 through 49 for 
the soft fonts and 4142 through 4145 in the TFMs, be sure to make 
appropriate substitutions in this file, adding 4096 to the soft 
font code to calculate the TFM code.  Also, be sure to put the 
typeface code between quotation marks, so that Debug interprets 
it as a string of numerals rather than hexadecimal digits.

To modify your TFM typeface codes with the ASCII file that you 
created, enter:

     debug  <  changes

where "changes" is the name of the ASCII file that contains the 
typeface change commands.


Installing Fonts into WS
------------------------

Now that your Dingbats soft fonts and TFMs have been modified 
with new typeface codes, you may install them into WordStar.  Run 
LSRFONTS and install both the bitmapped (.SFP) and scalable 
(.SFS) fonts.  Install the scalable fonts as "scalable soft 
fonts," not "cartridge" fonts.  All fonts but Dingbats 100 will 
show bogus typeface names.  Use F5 in LSRFONTS to select the 
correct typeface name, "Zapf Dingbats."  This will NOT adversely 
affect Preview but will allow you to display the correct menu 
name when choosing fonts in WordStar.

Use PRCHANGE to add first the bitmapped versions of the Dingbats 
fonts to your PDF.  When prompted whether to create corresponding 
Preview fonts, answer "Y".  Then exit to DOS, saving the PDF.  
Restart PRCHANGE and delete the bitmapped Dingbats fonts that you 
previously installed, then install the scalable versions.  Exit 
to DOS, saving the PDF.

You should now be able to Preview all five Dingbats fonts in 
WordStar.  Each will appear as a unique font in WordStar's font 
selection menus.  Keep in mind that the PostScript and Ventura 
Dingbats fonts have identical character sets in the range below 
128 decimal (keyboard characters).  In the range above 128 
decimal, particularly in the area above 160 decimal (characters 
that are only accessible by entering ^P or Alt then the 
three-digit code), these character sets do vary.

In order to use the Dingbats fonts in other applications, you may 
need to reverse the changes that you made to the soft font and 
TFM typeface codes.  Use the same procedures outlined to make the 
original changes, except use 45 as the replacement soft font code 
and 4141 as the TFM code.  You will have to experiment to see 
what files with which typeface codes must remain on your hard 
disk to get proper printed results from WordStar and your other 
applications.  

Remember that this entire procedure cuts across the grain of the 
very design of WordStar, Page Preview, and HP's scalable font 
technology.  Please do not call WordStar or Hewlett-Packard 
technical support for assistance with this procedure.  If you 
have trouble with the procedure and have followed these 
suggestions verbatim, leave a message for the author on the 
CompuServe WordStar Forum, i.d. 76702,520.  Because this 
procedure is highly technical and not officially supported by the 
applications involved, THERE IS NO GUARANTEE THAT IT WILL WORK 
FOR YOU.  I can only render basic assistance; please understand.
