Dec 262017
Converter for HP soft fonts to TEX format. TEX is a typesetting system created by Donald Knuth.
File HP2TEX.ZIP from The Programmer’s Corner in
Category DeskTop Publishing
Converter for HP soft fonts to TEX format. TEX is a typesetting system created by Donald Knuth.
File Name File Size Zip Size Zip Type
HP2TEX.COM 23377 15889 deflated
HP2TEX.PAS 26986 8720 deflated
README 11034 4556 deflated
TESTFONT.TEX 9288 3961 deflated

Download File HP2TEX.ZIP Here

Contents of the README file


This program will read an HP soft font and generate two files useful to TeX
users, a PL and a PXL file. I'll explain what to do with those in a minute.


In order to use this program, type (assuming your prompt is c:> )

c:> hp2tex

at the command prompt, and then answer the questions posed by the program
regarding input and output files. All file names must be fully qualified,
otherwise an extension of .sfp is added for the softfont file, .pxl to the
pixel file, and .pl to the pl file. You can also supply the file names in the
command line. They are positional. For example, if you want to convert HPs 12
point helvetica font (hv for helvetica, 12 for 12 point, r for regular (others
might be i for italic, b for bold, etc.), us as in US of A, and SFP for soft
font, portrait mode. Other font sources use a variation on this, or maybe
something radically different - a rose by any other name ....)
You can use whatever name you want for the pxl and pl, but relating it to the
HP name might help you remember what you did.

c:> hp2tex hv12r#us.sfp helv12.pxl


In order to use the font in TeX, take the PL file and run PLTOTF (part of
TeXware, check your manual if this is meaningless to you).

c:> pltotf
Name of PL file:
Creating helv12.tfm

(more output)

Now move helv12.tfm to where your tfm files are. For Microtex this is
something like \tex\fonts. On pcTeX I think its \pctex\textfms.
If your not sure, look around your disk for cmr10.tfm and move helv12.tfm
(or whatever you created) to the same directory.

The PXL file may be useful if you have an older (obsolete) driver. More likely
you will need to run PXTOPK (also part of the TeXware distribution) to
generate a packed PK file used by more modern drivers. (If you require GF
files, I'm afraid you are out of luck. )

C:> pxtopk
Name of .pxl file: helv12.pxl
Name of .pk file:

Now move the to where your pk (pxl) files are. (We'll give a little
more on magnification in a minute, so bear with us.)

For older Arbortext (textset) drivers, I think the pxl files were in


For new Arbortext its a longer name

\arbortext\....(I forgot)..\canon\300\

pcTeX is something like


You can try to figure it out on your own by looking for It will be
in several directories, one with a name 300, another 360, ... .
Put it in the directory with the 300. (On UNIX systems look for cmr10.300pk
and stash the file there.)

Your driver might have a file listing all the fonts and resolutions it is
available at. For example Arbortext has (I think) a file called
\arbortxt\dvilaser\dvips.fnt for its postscript driver.
Add a line similar to the ones you find in it. Thus:

helv10 10 300 360

(font name, design size, list of resolutions)

Don't worry if your driver doesn't have this file, many don't.


If you are using plain TeX, then add the command


near the beginning of your file. (\hv is the command string to select the font
in the document, helv10 is the name of the file on your disk)

in LaTeX


\hv will work like many other font change commands (\it, \em, \bf). It is
unlike the other font commands in that it is associated with a single size of
font, it is unchanged by commands like \large or \small.


An important question you will be asked is about the design size and
magnification of the font. If you don't understand these and are in a rush,
just accept the defaults supplied by the program. Design size is the nominal
size of the font. This value is selected so that 10 point fonts from different
families will look good together. This does NOT mean that the capitals (or any
particular character in the alphabet) is 10 points high. You can usually find
the design size in the name of the font. Magnification is part of TeX that
allows scaled fonts to share the same .tfm file. To a first order
approximation, many fonts you get will be scaled between point sizes. You can
save a little space on your disk by using the magnification parameter.
Magnification is 1000 times the scaling of the font. A font at normal size has
a magnification of 1000. If you have a twelve point font that was generated by
scaling a 10 point font, then you would say that magnification is 1200
(1000*12/10). The design size is 10 points (you are using a 10 point design at
12 points, or 1200 magnification). You should put the resulting pxl file in
the directory for fonts scaled 1200 (or magstep1). You can eliminate the pl
file just generated, as long as you have the pl for the font scaled 1000. Be
careful in naming your files, since a 12pt version created by scaling a 10
point font must have the same name as the 10 pt.

Let's give an example. Suppose you have two .sfp files, hv10.r#us.sfp and
hv12r#us.sfp, the latter being a scaled version of the former. You could run
hp2tex on each, accepting the default values for mag and design size.

c:> hp2tex hv10r#us helv10 helv10

c:> hp2tex hv12r#us helv12 helv12

In this case, you generate, helv10.pxl,, and helv12.pxl.
Convert the pl files with pltotf to helv10.tfm and helv12.tfm. Convert the pxl
files to and using pxtopk, and place both in the \300\
subdirectory of your font directory. (If you are using the .pxl files, they go
in the \1500\ subdirectory.)

Now let's say you want to save
space on the tfm's since these are scaled fonts. You run hp2tex on helv10.sfp
and create and helv10.pxl.

c:> hp2tex hv10r#us helv10 helv10

Convert these to the tfm and pk and store
them away. Now run hp2tex on helv12 and specify 1200 magnification and 10
design size. The output files are helv10.pxl and (Thats right,
^^ ^^
those are 10s not 12s, although our input was 12 point. Remember we are
scaling the font, so we store the font under its real name, and store it in a
directory based in the scaling.)

c:> hp2tex hv12r#us helv10 helv10
^^ ^^

After hp2tex completes, convert the new helv10.pxl to and store it
in the \360 (300*1.2) subdirectory of your font directory (\1800\ if using
pxl files). You can throw away the .pl file, it should be close to the one
created from helv10, if the fonts are really scalings of one another. The best
test to see if the fonts are really scalings is to run the result through TeX
and see if the results look good. If not, rerun hp2tex with magnification=1000
and actual design size.

If you still don't understand, don't feel bad. Just go ahead and accept the
defaults; tfm files aren't that big, you can probably afford to have them

To use the scaled font in plain TeX

\font\hvtwlv=helv10 at 12 point


\font\hvtwlv=helv10 scaled 1200


\font\hvtwlv=helv10 scaled \magstep1

In LaTeX

\newfont{\hvtwlv}{helv10 scaled \magstep1}


The pl file generated by this program contains several parameters that
determine the appearance of the TeX output. These parameters control the
interword glue, the space after a period, the size of a quad and em-space, and
the parameters determining accent placement. The "correct" values for these
parameters are NOT contained in the HP soft fonts. They are estimated by
HP2TEX, and might not be very good estimates. If your output is visually bad,
read about font dimen parameters in the back of the TeX book (or Metafont
book) and adjust their values in the pl file. Then generate a new tfm file.

We have not even attempted to deal with kerns, although you could add those
to the pl file as well. Ligatures require the same action, assuming the
ligature glyph is in the font at all. Included in this archive is the file
testfont.tex which will allow you to print out a table of your new font. It is

This program was written by David Strip, Albquerque NM with generous help from
Dimitri L. Vulis of NYC. This program is copyrighted, and in keeping with the
spirit of the TeX community, you are granted permission to copy and
redistribute this program, so long as you provide the source along and this
readme file along with any executable. In addition, you may not charge any fee
in excess of the actual cost of the media and reasonable labor charges. This
charge may not exceed $3.00 per disk plus shipping costs. This software may
not be packaged together with any other software unless the complete package
also meets the stated terms for redistribution. These terms apply to derivative
codes as well. To put it simply, we are not making a profit on this code, and
we won't allow you to either. Exemptions to these terms may be granted only by
the authors, and must be in writing.

If you should modify this code in a useful way, we would be pleased to receive
a copy of your efforts. An ambitious soul might try to add a capability to
read the kerns from one of the CM font .pl files and 'scale' them as a first
cut at kerns for the font being converted. Another nice addition would be the
capability to produce .gf format files, instead of .pxl, as this would allow
character codes above the 127 limitation of .pxl formats. We will also attempt
to respond to bug reports. Bear in mind, however, that you didn't pay anything
for this code.

We have already noted that certain fonts generated by glyphix appear to
convert with a bad underscore character that is far too low. This is in fact
how the underscore is encoded in the font, not an artifact of the conversion.
Sorry, we are not planning to try to correct glyphix's error.

If you are pleased with what you got and want to return the favor, send us a
disk with your favorite HP downloadable fonts, or anything else nice. Surprise
us with goodies in our mailboxes!!!!

February 1, 1988

David Strip (arpanet: [email protected]
uucp: ....(ucbvax, cmu!rice, ihnp4!lanl, gatech)!unmvax!intvax!drstrip)
Snail mail:
431 Camino de la Sierra NE
Albuquerque, NM 87123

Dimitri L. Vulis (bitnet: [email protected]
arpanet: dlv%[email protected])
Snail mail:
529 W. 111 St. #61
New York, New York 10025-1943

(c) Copyright 1988, David Strip and Dimitri L. Vulis, all rights reserved.

Change History:

V. 1.0 Original Release, February, 1988

 December 26, 2017  Add comments

Leave a Reply