[pdftex] pdftex - Encoding for metafont PK fonts

Reinhard Kotucha reinhard.kotucha at web.de
Sun Jun 26 07:54:19 CEST 2016

On 2016-06-25 at 22:56:48 +0000, Ross Moore wrote:
 > But it is pity that it is not possible to specify that enc file
 > also for PK fonts generated by MetaFont. Or it is somehow possible?

 > I see no reason why not, but could easily be wrong.
 > But I must admit that IÕve not tried it with a PK font.

Dear Ross,
I assume that the main problem is that Metafont is using numerical
glyph indices but in order to re-encode a font, it's required that
each glyph has a name.

In order to use PK fonts with dvips or pdftex, they have to be
converted to Type 3 at least.  Converting them to Type 1 is preferred,
of course.  In Metafont glyphs have numerical indices, try

   tftopl $(kpsewhich csr10.tfm) | less

I suppose that by default the encoding of Knuth's Computer Modern
fonts is used.  I don't know whether it's sufficient to define glyphs
in ISO-8859-2 order in Metafont.

In order to apply an encoding vector and use the facilities provided
by dvips and pdftex, it's necessary to replace numeric glyph indices
with names.  If the initial encoding is arbitrary, manual work cannot
be avoided.

The best solution is to convert fonts created by Metafont to Type 1,
one way or another.

 > Font outlines have been the preferred technology for ~20 years or
 > more, so IÕve not had the need with bit-mapped fonts.

Of course.  But the main reason you don't need PK fonts anymore is
that at least the most important fonts are available as Type 1

For instance, 20 years ago the output of musictex was brilliant on
paper but ugly on screen.  A lot happened since then.

There are several tools nowadays which are supposed to convert fonts
created with Metafont to Type 1.  They either try to understand the
Metafont source code (MetaType1, by Boguslaw Jackowski) or they create
a high-resolution PK file and scan the outlines (textrace, by Peter

The former is preferred because programs which trace outlines of
bitmaps cannot reliably distinguish between an angle and a curve, even
at high resolutions.

On the other hand, when Tigran Aivazian was typesetting "The Hebrew
Old Testament" in TeX, he used textrace in order to convert the Hebrew
fonts created by Yannis Haralambous with Metafont to Type 1 and the
result is amazingly good.

Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de

More information about the pdftex mailing list