# Two encoding files for one font in pdftex.map

What does it mean when pdftex.map has two encoding files in the entry of one font?

Background: I am one of the maintainers of matplotlib, a Python plotting library. One feature of matplotlib is that it can process all text strings through TeX, read the resulting dvi file and embed the results in the plot. When implementing this functionality, I found out that the fonts referenced in dvi files have to be looked up in a map; out of the few map files available in a typical TeX distribution I chose pdftex.map, which is documented in Chapter 5 of the pdftex manual. That manual specifies the following format for each line in this map file:

``````tfmname basename fontflags special encodingfile fontfile
``````

It says that the `special`, `encodingfile`, and `fontfile` fields can be in any order, and that `encodingfile` can be left out, but it does not say that there can be more than one `encodingfile`.

Now some users are reporting that TeX Live 2010 installs a pdftex.map file that has the following line:

``````pbkdo8y URWBookmanL-DemiBold ".167 SlantFont TeXnANSIEncoding ReEncodeFont" <texnansi.enc <8r.enc <ubkd8a.pfb
``````

Is this a bug in TeX Live, and what does pdftex do with this information? Does it include an embedded PostScript interpreter that reads both encoding files, parses the `special` field and decides that texnansi.enc contains the encoding that needs to be applied?

-

Hàn Thế Thành reports that pdftex simply takes the last of the encoding files without regard to the `TeXnANSIEncoding ReEncodeFont` input. I think this is therefore a bug in TeX Live, since the font should probably be encoded with the other encoding.
I don't know if the additional enc-file does any harm (I doubt it) but it is certainly senseless and quite probably simply a typo in a map-file. At first 8r.enc would have an effect only if they were a corresponding declaration `TeXBase1Encoding ReEncodeFont`. And at second a font can't be encoded in two different ways at the same time.