LaTeX Font Warning: Font shape `<shape>' undefined

The font has no such combination of family, weight and shape (bold small caps, say), so LaTeX substitutes another. Change font encoding or font.

Help centre › LaTeX errors › Files and fonts · Warning: the document still compiles

What the log says

LaTeX Font Warning: Font shape `OT1/cmr/bx/sc' undefined
(Font)              using `OT1/cmr/bx/n' instead on input line 3.

What it means

LaTeX describes a font by encoding, family, series (weight) and shape: OT1/cmr/bx/sc is Computer Modern, old encoding, bold extended, small caps. The current font has no file for that combination, so LaTeX uses the nearest it has (named after using) and the text looks different from what you asked for. The document compiles; the warning tells you which combination is missing.

Causes and fixes

Most common first. Each example is a complete document; the first fails with this message, the second is the same document fixed.

1. Bold small caps (or another combination) in the default OT1 encoding

The original Computer Modern fonts have no bold small caps. Loading the T1 font encoding uses the extended set that does have them.

Fails
\documentclass{article}
\begin{document}
\textbf{\textsc{Bold small caps}}
\end{document}
Fixed
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\textbf{\textsc{Bold small caps}}
\end{document}

2. The chosen font family does not have that shape

Many font packages lack some combinations; Latin Modern (lmodern) has no bold small caps, many fonts have no bold typewriter or slanted small caps. Use a combination the font has (here regular-weight small caps), or choose a font family that has the one you need.

Fails
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}
\textbf{\textsc{Bold small caps}}
\end{document}
Fixed
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}
\textsc{Small caps}
\end{document}

3. A font family name that is not installed

\fontfamily{…} with a name that has no font definition makes LaTeX fall back to the default font and warn. Check the family name in the font package's documentation, or load the font through its package.

In Manulyx

The warning is listed with the other warnings after the compile, with the font combination that was replaced.

Write in Manulyx for free · Journal templates

More in files and fonts

Every example on this page was compiled with pdfLaTeX to check that it fails and is fixed as described. All LaTeX errors