fontinst, sans serifs and (wrong) ligatures

Lars Hellström Lars.Hellstrom@math.umu.se
Wed, 31 Jul 2002 01:33:40 +0200


At 00.59 +0200 2002-07-30, Till Andreas Heilmann wrote:
>Dear Mr. Hellstrom
>
>I do have a question concerning the fontinst package.

I would rather had seen that you had posted your question on the fontinst
mailing list (fontinst@cogs.susx.ac.uk), but never mind that now. I've
Cc'ed this reply there.

>I recently tried to install the Adobe Avantgarde Postscript font for
>(La)TeX.
>
>(Almost) everything worked fine, but somehow Avantgarde uses ligatures
>(fi, ff, fl ...) which I find rather disturbing. This shouldn't really
>happen with any Sans Serif font, should it?

I suppose that is really up to the font designer to decide. Fontinst does
however give you the ability to override some such decisions.

>I'm not sure where this comes from. First, I converted from Macintosh
>Postscript Binaries via Crossfont to Windows Postscript Binaries, then
>installed the according TFM, VF etc. files via fontinst (see
>instpag.tex below).

My guess would be that they are in the fonts (Adobe are fond of designing
according to encoding vectors rather than common sense). The fontinst
defaults can however in some cases make things worse.

>Is there a command in fontinst that disables ligatures?

Not an individual command, no, but you do have the control needed to remove
them. See below:

[snip]
>\installrawfont{pagb8r}{pagb8r,8r}{8r}{8r}{pag}{b}{n}{}
>\installfont{pagb7t}{pagb8r,latin}{OT1}{OT1}{pag}{b}{n}{}
>\installfont{pagb8t}{pagb8r,latin}{T1}{T1}{pag}{b}{n}{}

There are basically two ways of removing the f-ligatures here. One is to
make  copies of ot1.etx and t1.etx in which you remove the \ligature
commands in \setslot{f} ... \endsetslot, and then use these files instead
of the standard ones (change the third arguments of these \installfont
commands). The other method is to unset the ligature glyphs so that they
won't get used by the VFs. This can be done by including a file (say)
unsetligs.mtx before latin.mtx in the second arguments of the \installfont
commands. This unsetligs.mtx would then contain e.g.

\relax
\metrics

\unsetglyph{ff}
\unsetglyph{fi}
\unsetglyph{fl}
\unsetglyph{ffi}
\unsetglyph{ffl}

\endmetrics

In this latter case, TeX will still do ligature processing, but the
ligature glyphs will look exactly like the character sequences they
replace. I think the former method is preferable.

Also, you might want to check whether the kerning in the character pairs
ff, fi, and fl makes sense. Since this font is meant to be used also by
programs without ligature processing it probably does, but if it doesn't
then you should add suitable kerns as part of the fontinst processing.

Lars Hellström