TeX font errors: Cheat sheet
However, I bumped into a number of error messages which did not immediately provide me with information of how to get rid of them. For one, this is because LaTeX is quite complex, and it would probably require a book or two to properly describe what you would have to do to debug.
Well, this is not going to be a book here, but I still hope you'll find it useful: I compiled the (according to my very own empiricism) most frequent error messages and – here comes the good part – means of how to tackle them.
Anyway, here we go.
All the error messages were generated while installing the infamous MS Comic Sans font with T1 encoding. According to Karl Berry's font name scheme, TeX refers to is as jcs.
-
LaTeX Font Warning: Font shape `OT1/jcs/m/n' undefined
(Font) using `OT1/jcs/m/n' instead on input line 23.If you select the font explicitly by
you might run into the same issue. The problem is that LaTeX can't find a definition (in an FD file or in the source file itself) that links the font family jcs with series m and shape n and the current encoding to a specific internal TeX font.
\fontfamily{jcs}\fontseries{m}\fontshape{n}\selectfont My sample text.That said, the problem is mostly the encoding. Are you using
that is, T1 encoding? Well, LaTeX's default is OT1, so it's probably just enough to force T1 encoding in your source file with
\DeclareFontFamily{T1}{jcs}{}
\DeclareFontShape {T1}{jcs}{m}{n} { jcsr8t }{}
\usepackage[T1]{fontenc} -
kpathsea: Running mktextfm jcsr8t
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode;
input jcsr8t
This is METAFONT, Version 2.718281 (Web2C 7.5.7)kpathsea: Running mktexmf jcsr8t
! I can't find file jcsr8t'.
...=ljfour; mag:=1; nonstopmode; input jcsr8tPlease type another input file name
! Emergency stop.
...=ljfour; mag:=1; nonstopmode; input jcsr8tTranscript written on mfput.log.
grep: jcsr8t.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input jcsr8t'
failed to make jcsr8t.tfm.
kpathsea: Appending font creation commands to missfont.log.! Font T1/jcs/m/n/10=jcsr8t at 10.0pt not loadable: Metric (TFM) file not found.
relaxNow, somewhere in TeX's data (in an FD file corresponding to your font or in the source file), one of TeX's internal font names is specified, (like jcsr8t here). Unfortunately, TeX can't find a file named jcsr8t.tfm now; you can verify this with
which doesn't give any location. This file is needed to use the font. If you are sure that the file is there, update TeX's cache.
$> kpsewhich jcsr8t.tfm -
! TeX capacity exceeded, sorry [max level recursion of virtual fonts=10].
This error message arises when there is a TFM file and a VF file that points to a raw TFM file that happens to be the original TFM file itself. From there, TeX finds the corresponding VF file again and so on: happy looping until TeX is tired.
There probably was an error when creating the font files which resulted in not distinguishing raw TFM and TFM file. If you created the font files yourself, make sure that these are actually different files.
-
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 0+420/600 --dpi 420 rjcsr8t
mktexpk: don't know how to create bitmap font for rjcsr8t.
kpathsea: Appending font creation commands to missfont.log.!pdfTeX error: pdflatex (file rjcsr8t): Font rjcsr8t at 420 not found
==> Fatal error occurred, no output PDF file produced!Probably the most common error message in LaTeX fonts.
It's being triggered when the information in the (raw) TFM file is not sufficient to create the actual font, and thus again is a font installation error.
- Check that you did not interchange raw TFM and TFM font file (the raw TFM file should be a lot smaller).
- Check that TeX finds your VF file if there is one.
Another possible cause is that the raw TFM is declared in no MAP file, or that TeX's map cache isn't updated. Look for a map file with an entry starting with the raw TFM name, for example,
In Linux, this could for example be done by
rjcsr8t Comic-Sans "T1Encoding ReEncodeFont"If you can't find it, create a proper map file, and update TeX's map cache:
$> find /path/to/mapfiles | xargs grep rjcsr8t
$> updmap --enable Map=/path/to/mapfile.map -
!pdfTeX error: pdflatex (file T1-WGL4.enc): cannot open encoding file for reading
==> Fatal error occurred, no output PDF file produced!Probably easy: LaTeX can't find the encoding file. Can you? In this case, you probably forgot to update TeX's cache:
$> texhash -
!pdfTeX error: pdflatex (file Comic-Sans.ttf): cannot open TrueType font file
for reading
==> Fatal error occurred, no output PDF file produced!The actual font file appears to be missing. Again, this might be a matter of updating TeX's cache; also make sure that the user can actually access the font file (read: get file permissions right).
| Attachment | Size |
|---|---|
| 217.95 KB |


Comments
Typo: kspewhich
Thanks for this guide! A minor typo: where you write kspewhich, you probably mean kpsewhich.
Add new comment