Purplelink
← All LaTeX errors

Font not loadable: Metric (TFM) file not found

TeX tried to load a font and could not find its metric file. The font package is not installed, the font name is misspelled, or, in XeLaTeX and LuaLaTeX, the font is not installed on the computer.

What it means

Before TeX can set a character in a font, it reads the font's metric file, a .tfm file with the size of every character. pdfLaTeX finds fonts only through these files. When the file named in the message is not in the TeX distribution, TeX reports this error, uses \nullfont, a font with no characters, and carries on. Text that should have been set in the missing font is left out of the PDF, and the log has a line such as Missing character: There is no R in font nullfont! for each character it dropped.

XeLaTeX and LuaLaTeX can also load fonts installed on the computer. Their versions of the message end differently: Metric (TFM) file or installed font not found. from XeLaTeX and metric data not found or bad. from LuaLaTeX.

The log line

This small file triggers the error on a TinyTeX installation, which includes the bookman package's style file but not the Bookman fonts:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{bookman}
\begin{document}
Results are in Table 2.
\end{document}

Compiled with pdfLaTeX (TeX Live 2026), it writes this to the .log file:

! Font T1/pbk/m/n/10=pbkl8t at 10.0pt not loadable: Metric (TFM) file not found.
<to be read again>
                   relax
l.4 \begin{document}

I wasn't able to read the size data for this font,
so I will ignore the font specification.
[Wizards can fix TFM files using TFtoPL/PLtoTF.]
You might try inserting a different font spec;
e.g., type `I\font<same font id>=<substitute font name>'.

! Font \T1/pbk/l/n/10=nullfont not loadable: Metric (TFM) file not found.

The part after the = sign is the metric file TeX looked for: pbkl8t, so pbkl8t.tfm. The part before it is LaTeX's name for the font: encoding T1, family pbk (Bookman), weight m, upright shape n, 10 points. The l.4 line points at \begin{document}, not at the \usepackage line, because LaTeX loads the main font when the document starts. The second error, with nullfont, follows from the first and goes away with it.

With XeLaTeX or LuaLaTeX and \setmainfont{Minion Pro} on a computer without that font, the first message comes from the fontspec package:

! Package fontspec Error:
(fontspec)                The font "Minion Pro" cannot be found; this may be
(fontspec)                but usually is not a fontspec bug. Either there is
(fontspec)                a typo in the font name/file, the font is not
(fontspec)                installed (correctly), or there is a bug in the
(fontspec)                underlying font loading engine (XeTeX/luaotfload).

Further down the same XeLaTeX log is the engine's own message:

! Font TU/MinionPro(0)/m/n/10="Minion Pro" at 10.0pt not loadable: Metric (TFM) file or installed font not found.

To try a fix without touching your project, save the pdfLaTeX example as a .tex file and compile it online with the LaTeX to PDF tool.

Why it happens

The causes below are in order of likelihood. Each has a before and an after you can compare with your own source.

1. The font package is not installed

Small distributions such as TinyTeX and BasicTeX ship a subset of packages, and a font's style file can be installed while its fonts are not. Search for the package that contains the metric file, using the name after the = sign, then install it with tlmgr, the TeX Live package manager. A full TeX Live or MacTeX installation already includes these fonts.

Before

\usepackage{bookman}
% ! Font T1/pbk/m/n/10=pbkl8t at 10.0pt not loadable: Metric (TFM) file not found.

After (in a terminal)

tlmgr search --global --file pbkl8t.tfm
# bookman:
#     texmf-dist/fonts/tfm/adobe/bookman/pbkl8t.tfm
tlmgr install bookman
pdflatex main.tex

tlmgr install also registers the font's map file, which pdfLaTeX uses to find the font outlines it embeds in the PDF.

2. The font name is misspelled

A name given directly to \font, or in a \DeclareFontShape line, has to match a metric file exactly. A misspelled family name in \fontfamily gives a different message, a Font shape ... undefined warning, and LaTeX substitutes another font.

Before

\font\big=cmbx100 at 14pt
% ! Font \big=cmbx100 at 14.0pt not loadable: Metric (TFM) file not found.

After

\font\big=cmbx10 at 14pt

3. XeLaTeX or LuaLaTeX cannot find the font on the computer

With fontspec, the name in \setmainfont has to match an installed font. On a Mac, open Font Book and copy the family name exactly, with its spaces and capitals. If the font is not installed, install it or choose one that is.

Before

\usepackage{fontspec}
\setmainfont{Minion Pro}
% ! Package fontspec Error: The font "Minion Pro" cannot be found

After

\usepackage{fontspec}
\setmainfont{Palatino}

4. Font files copied in by hand are not in TeX's file database

If you copied .tfm files into the distribution's local tree by hand, run mktexlsr so that TeX's file database includes them. If the font came with a .map file, enable it as well, with updmap-sys --enable Map= and the map file's name, so pdfLaTeX can embed the font. With MacTeX, both commands need sudo. A tlmgr install does both for you.

Before

# .tfm files copied into texmf-local, nothing else run

After (in a terminal)

mktexlsr
updmap-sys --enable Map=myfont.map

How to find the line

For this error the font name in the message matters more than the line number. The l. line is where TeX first needed the font, which for the main text font is \begin{document}. Search your preamble for the package or command that chose the font.

When you run pdflatex in a terminal without -interaction=nonstopmode, TeX stops at the error and prints a ? prompt. Press Return to carry on past the error, type x to quit, or type h for TeX's own help text, which is the paragraph you see after the l. line in the log. Editors run TeX in non-stop mode, so you get the log and never see the prompt.

What each editor shows:

Related errors

Frequently asked questions

What is a .tfm file?
A TeX font metric file. It holds the size of every character in a font, which TeX needs to set text in it. pdfLaTeX can only use a font that has .tfm files in the TeX distribution.
Which package do I install for a missing .tfm file?
Take the name after the = sign in the message, add .tfm, and run tlmgr search --global --file with it, for example tlmgr search --global --file pbkl8t.tfm. It prints the package that contains the file. Install that package with tlmgr install.
Why can XeLaTeX use a font that pdfLaTeX cannot?
pdfLaTeX only uses fonts set up for TeX, with .tfm metric files. XeLaTeX and LuaLaTeX with the fontspec package can also load OpenType and TrueType fonts installed on the computer, by name.

From the maker of these tools

Writing LaTeX on a Mac?

ModernTex is a native macOS LaTeX studio. It has multi-file manuscript navigation, a PDF preview that stays in sync, BibTeX completion that searches by author or title, and compile errors in plain language. $19.99 once, all updates included, forever.

Requires macOS 14 or later. Free 7-day trial, no account.