Consider this ex-14-5.mf:

mode:=ljfour; % 600dpi for dvips (you must run "gftopk")

pickup pencircle scaled (.4pt+blacker);
draw fullcircle scaled .2w shifted (w/2,(h+d)/2-d);
draw fullcircle scaled .6w shifted (w/2,(h+d)/2-d);
draw fullcircle scaled w shifted (w/2,(h+d)/2-d);


Run metafont on it. All is good:

$ mf ex-14-5
This is METAFONT, Version 2.7182818 (TeX Live 2017) (preloaded base=mf)
(ex-14-5.mf [101] )
Font metrics written on ex-14-5.tfm.
Output written on ex-14-5.600gf (1 character, 696 bytes).
Transcript written on ex-14-5.log.

Now run tex on this file. All is good:

\font\x=ex-14-5 \x e \bye
$ tex ex-14-5
This is TeX, Version 3.14159265
(ex-14-5.tex [1] )
Output written on ex-14-5.dvi (1 page, 260 bytes).
Transcript written on ex-14-5.log.

When running dvips -M0 ex-14-5 it tries to create the pk file automatically:

This is dvips(k) 5.998 Copyright 2018 Radical Eye Software (www.radicaleye.com)
' TeX output 2019.03.14:1625' -> ex-14-5.ps

kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+0/600 --dpi 600 ex-14-5
<various errors follow>

If I generate the pk file manually before calling dvips ex-14-5, all is OK:

$ rm *pk
$ gftopk ex-14-5.600gf
$ dvips ex-14-5
This is dvips(k) 5.998 Copyright 2018 Radical Eye Software (www.radicaleye.com)
' TeX output 2019.03.14:1625' -> ex-14-5.ps

Except using -M0 command line option, I tried adding M0 to .dvipsrc - it does not help.

How to tell dvips not to attempt to generate pk file automatically?

  • I don't understand the question. What should dvips do with your char if the pk is not there? Leave a blank space? Mar 14, 2019 at 9:52
  • @UlrikeFischer I think the problem being pointed to is that gftopk works but mktexpk does not, so perhaps a solution that involves calling gftopk instead would also be acceptable. Mar 14, 2019 at 18:57
  • @ShreevatsaR possible, but the question doesn't say so. Also on my system the compilation works fine, mktexpk doesn't fail. Mar 14, 2019 at 19:09
  • @UlrikeFischer Maybe the question is about the fact that dvips has a documented -M option: "Turns off the automatic font generation facility. If any fonts are missing, commands to generate the fonts are appended to the file missfont.log...". That option seems to partially work for me (it doesn't write the missfont.log file), but it's not clear to me why the OP is trying -M0 instead of -M. Mar 14, 2019 at 21:05
  • @ShreevatsaR indeed, -M must be used instead of -M0! This works: dvips -M ex-14-5. I would better use this option globally. Do you know how to use this option via config file or environment variable? (M in .dvipsrc does not work - is this a bug?) Mar 15, 2019 at 1:24

1 Answer 1


If you use font via ./, like


then mktexpk is not called.

This feature allows to inhibit mktexpk selectively. -M option is unusable in this case, because it inhibits mktexpk for ALL fonts.

The magic happens in kpathsea_find_glyph. This is the relevant code from tex-glyph.c

    /* If not an alias, try creating it on the fly with mktexpk,
       unless FONTNAME is absolute or explicitly relative.  */
    if (!ret && !kpathsea_absolute_p (kpse, fontname, true)) {

So, kpathsea_absolute_p returns true when filename is explicitly relative.

Using the relative path the output from dvips is now as required:

$ dvips -q ex-14-5
dvips: Font ./ex-14-5 not found; using cmr10
dvips: Design size mismatch in font ex-14-5
dvips: Checksum mismatch in font ex-14-5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.