aifont hack

Skip Collins bernard.collins@jhuapl.edu
Thu, 21 Sep 2000 17:42:28 -0400


I have received some complaints from no-good ingrates that my aifont package
breaks tds. To quell their grumblings, I thought I should ask here what the
best way to handle this would be.

The aifont package is meant to overcome font bugs in various ps/pdf
interpreters/renderers. Some software (e.g. all versions of Adobe Illustrator
and some versions of Acrobat Reader, as well as Windows and MacOS) have
problems with type 1 fonts having characters in the 0-31 range. Most of the
BlueSky/AMS/Y&Y type 1 fonts have such characters, though they are doubly
encoded at higher locations. The aifont package is basically a set of virtual
fonts that map the lower encoding slots to the higher ones on a font-by-font
basis. So cmr10.tfm has a companion virtual font cmr10.vf that maps all the
lower characters to higher ones in aicmr10.tfm. The dvi processor (or pdftex)
looks in a map file to find that aicmr10.tfm corresponds to type 1 font
cmr10.pfb. The resulting postscript or pdf uses the higher characters and
everyone is happy.

The only problem with this arrangement is that it is probably not a good idea
to have dvips, pdftex, and friends use virtual fonts for the Computer Modern
family by default. They should be optional at run time. I accomplished this
by putting the .vf files and other .enc and map files and under a
noncompliant directory (texmf/ai) and using shell script wrappers to define
the appropriate kpathsea environment variables so that pdftex and friends can
find the files. For example here is a bash script called aipdftex:

#!/bin/sh
VFFONTS='$TEXMF/ai/vf:'
TEXPSHEADERS='$TEXMF/ai/config:'
pdftex ${1+"$@"}

So, my question (finally) is, what is the right thing to do? Do I just
install the virtual fonts in their canonical tds locations and force dvips
and pdftex to always use them? Is there a better way to hide the .vf files
which does not break tds? Ideally all this should be done in a map file
which, in addition to mapping .tfm files to .pfb files, could map to .vf
files also. If I understand how dvips and pdftex currently work, they check
for the existence of same-name .vf files before ever consulting a map file.

Please cc any responses directly to me.

Thanks,
Skip Collins