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.
\documentclass{article}
\begin{document}
\textbf{\textsc{Bold small caps}}
\end{document}\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.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}
\textbf{\textsc{Bold small caps}}
\end{document}\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
- LaTeX Error: File `<name>' not foundLaTeX cannot find a file you asked for: an \input or image name that is misspelled or missing, or a package or class that is not installed.
- LaTeX Error: Unicode character <c> (U+<hex>) not set up for use with LaTeXpdfLaTeX has no glyph for a character in your text. Write it as a LaTeX command, delete it if invisible, or compile with XeLaTeX or LuaLaTeX.
- LaTeX Error: Unknown graphics extension: <ext>\includegraphics was given an image format pdfLaTeX cannot read, such as .tif, .gif, .bmp or .svg. Convert the image to PDF, PNG or JPEG.
- LaTeX Error: Invalid UTF-8 byte sequenceThe file is not saved as UTF-8 (often Latin-1 or Windows-1252, from an old editor or a .bib export). Re-save it as UTF-8.
Every example on this page was compiled with pdfLaTeX to check that it fails and is fixed as described. All LaTeX errors