[Tex/LaTex] Running pdftex with specific map file

fontspdftex

Is it possible to run pdftex with a specific map file that is not named pdftex.map? I am aware that I can specify a search path for map files using the environmentvariable TEXFONTMAPS, but it seems that pdftex only uses a map file from this path if it is called pdftex.map.

Some background: I am developing a font package and would like to generate a font chart using fontchart.tex from the build directory without the need to install the font. pdftex has access to all necessary files (TFM, PFB and ENC files plus the map file), but doesn't process the map file since it is not called pdftex.map.

Best Answer

See documentation of pdfTeX (pdftex-a.pdf). You can use e.g. \pdfmapfile in you document. Or to quote the documentation:

If you want to use a base map file name other than pdftex.map, or change its processing options through a pdfTeX format, you can do this by appending the \pdfmapfile command to the \everyjob{} token list for the -ini run, e. g.: \everyjob\expandafter{\the\everyjob\pdfmapfile{+myspecial.map}} \dump This would always read the file myspecial.map after the default pdftex.map file.

Related Question