DESCRIPTION

afm2pl is meant to be a replacement for afm2tfm, on which it is
based. Its default action is to convert an afm file to a tfm file,
with preservation of kerns and ligatures (with afm2tfm, preserving
kerns and ligatures is possible only in a roundabout way).

For PostScript text fonts, Y&Y's texnansi is the recommended
encoding to be used with afm2pl.  This gives you a good character
set with all the more important accented characters and many
typographic symbols available as single characters, without a need
for either virtual fonts or a separate text companion font.

Full LaTeX support for this encoding is available in the form of the
texnansi package, which is already part of TeX Live and teTeX.

The distribution also contains uppercased and lowercased versions of
texnansi, texnanuc.enc and texnanlc.enc, to allow font-based rather
than macro-based uppercasing and lowercasing. LaTeX macro support
for this, in the context of LaTeX2e's font handling, is not hard;
the key is to treat all-uppercase and all-lowercase as new shapes.

USAGE

This is the help message printed by afm2pl:

  Usage: afm2pl [OPTIONS]... FILE[.afm] [FILE[.pl]]
  Convert an Adobe font metric file to a TeX font property list.

  -p ENCFILE          Read/download ENCFILE for the PostScript encoding
  -o                  Use octal for all character codes in the pl file
  -e REAL             Widen (extend) characters by a factor of REAL
  -s REAL             Oblique (slant) characters by REAL, generally <<1
  -m INTEGER          Letterspace by INTEGER/1000 em
  --help              Print this message and exit.
  --version           Print version number and exit.

  See the man page for full documentation.


  Email bug reports to ntg-afm2pl@ntg.nl


INSTALLATION

Afm2pl is meant to be incorporated into a TeX Live/teTeX
installation. It involves the following steps:

- copy the executable for your platform to the same directory as the
other binaries of your TeX installation. For Linux/OS X, make sure
it has executable permission.

- copy the files in the texmf subdirectory to corresponding
positions in your own texmf tree, except for web2c/texmf.cnf.

- add the content of web2c/texmf.cnf to the existing texmf.cnf. If
there are several such files, the one in the texmf-var tree is a
good bet. Otherwise, consult the TEXMFCNF environment variable.
See the troubleshooting section below for possible additional
modifications to texmf.cnf.

- Update the filename database; e.g. by running mktexlsr or rehash.

INSTALLATION FROM SOURCE UNDER UNIX

- Get a teTeX or TeX Live source tree. Unpack it.
- Put a copy of or symlink to afm2pl.c in the texk/dvipsk
  subdirectory.
- Apply the included patches. The patches are against teTeX 2.02. If
  you have another source distribution and the patches don't work,
  try applying the modifications by hand. The patches are:
  tex-file.h.dif, tex-file.c.dif and texmf.in.dif in texk/kpathsea
  depend.mk.dif and Makefile.in.dif in texk/dvipsk
- Run configure in the parent of the texk directory.
- Run `make afm2pl' in texk/dvipsk
- Optionally, run `strip afm2pl'
- Copy afm2pl to the same directory as the other TeX binaries.

TROUBLESHOOTING

Problem: File searching with afm2pl may not work even though it has
been compiled with file searching.

Solution: if it is a ligfile that isn't being found, make sure that
the contents of the texmf.cnf from the package is included in a
texmf.cnf that is actually being consulted; see above.

If it is an encfile, then you may need another edit of your
texmf.cnf. If the entry for TEXPSHEADERS looks like

TEXPSHEADERS = .;$TEXMF/{dvips,pdftex,tex,fonts/type1}//

then try replacing it with

TEXPSHEADERS = .;$TEXMF/{{dvips,fonts/{map,enc}/{dvips,}},pdftex,tex,fonts/type1}//

There has recently been a change in the location of enc- and
mapfiles, and the afm2pl package conforms to the new standard.

Otherwise, try setting an environment variable TEXMFCNF pointing
to the director(y|ies) of texmf.cnf.

Problem: I get warnings

  I had to round some heights by 10.0000000 units.
  I had to round some depths by 2.0000000 units.

Solution: This is not a problem. afm2pl uses units of 1/1000 times
the design size, so these rounding errors are really quite small.

Problem: Characters are missing. I am using T1 encoding.

Solution: Don't use T1 encoding, at least not for Type 1 fonts. This
encoding requires virtual fonts since it encodes many accented
characters which aren't available as single characters in commercial
Type 1 fonts. Use texnansi instead, which forces TeX to compose
these missing characters from an accent and the base character.

Problem: Letterspacing doesn't work

Explanation: In this version, letterspacing is implemented with
kerns. However, the tfm format accomodates only about half the
amount of kerning pairs needed for full letterspacing. I have tried
hard to create a set which falls within these boundaries but still
contains all kerning pairs which are likely to matter. If you use a
different encoding, you might exceed these boundaries and as a
consequence lose all glyphs and kerns. See also below.

FUTURE PLANS

A future version may make afm2pl a more complete replacement of
afm2tfm, by adding an optional second, virtual font which may be
letterspaced or a small-caps font.

Feedback is welcome.

16 february 2004

Siep Kroonenberg
ntg-afm2pl@ntg.nl
http://www.ntg.nl/afm2pl.html
