When I use a metafont font, pdflatex calls mf to generate the pk font files. I would like to change the resolution at which the pk files are created.

If I'm correct, the call stack is: pdflatexkpsewhichmktexpkmf-nowin

As reported here http://tug.org/texinfohtml/kpathsea.html#Glyph-lookup , kpsewhich should call mktexpk to generate a missing font and this agrees with the fact that mktexpk is not one of the shell_escape_commands in texmf.cnf.

To change the mode and resolution options that are sent to mf I tried to modify mktex.cnf, but with no luck (tried also config.ps just in case; I also ensured that kpsewhich was finding the modified files, not others).

My target is ljfzzz with 1200 dpi; does anyone know how to set these as default settings?

Also, how should I call kpsewhich so that it generates the pk files? (of course, when the pk file does not already exists)

MWE - pdflatex the following:


(eventually delete the file shuffle10.600pk if you already have it)

  • 1
    The simplest way is to add \pdfpkmode{ljfzzz}\pdfpkresolution=1200 at the start of your document.
    – egreg
    Commented Oct 27, 2016 at 11:13

1 Answer 1


The simplest way is to add


at the beginning of your document.

If you want to set this globally there are a few steps to follow.

  1. Make a mktex.cnf file according to your needs

    : ${MT_FEATURES=appendonlydir:varfonts}
    : ${MODE=ljfzzz}
    : ${BDPI=1200}
  2. Copy it as /usr/local/texlive/texmf-local/web2c/mktex.cnf

  3. Make a copy of the default pdftexconfig.tex file in /usr/local/texlive/2016/texmf-dist/tex/generic/tex-ini-files/pdftexconfig.tex and change the line



  4. Save the modified file in /usr/local/texlive/texmf-local/tex/generic/tex-ini-files/pdftexconfig.tex

  5. Run mktexlsr

  6. Run fmtutil-sys --byengine pdftex

All steps unfortunately unavoidable, because pdftex starts by default with \pdfpkresolution=72, so a suitable value for this parameter must be set in the format.

This is an area where improvements could be made. For instance, the default value for \pdfpkresolution could be set according to a kpathsea variable instead of 72. This would avoid adding a value in pdftexconfig.tex and so just the change to mktex.cnf and setting the value in texmf.cnf would be necessary. So just steps 1, 2 and 5 would be needed.

Tested on a vanilla TeX Live on a GNU/Linux box. Note that you should have super user privileges and be careful that the super user shell path points to the correct TeX Live binaries.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .