LaTeX warning · Packages, files and fonts
LaTeX Font Warning: Font shape `OT1/cmr/bx/sc' undefined
Quick answer
A LaTeX font shape is encoding/family/series/shape, for example OT1/cmr/bx/sc is Computer Modern, bold, small caps. If the font has no file for that combination, LaTeX prints this warning and uses the nearest shape it has, usually upright bold, so the text silently looks wrong. Read the four parts of the message to see what was missing and switch to a font family that has it, add \usepackage[T1]{fontenc}, or drop the combination (for example use \textsc without bold).
The warning in the log
This is how the message appears in the .log file (and in the compile output). The line starting with l. is the line number where TeX noticed the problem; the real mistake is there or just before it.
LaTeX Font Warning: Font shape `OT1/cmr/bx/sc' undefined
(Font) using `OT1/cmr/bx/n' instead on input line 3.
LaTeX Font Warning: Some font shapes were not available, defaults substituted.Why it happens
- A combination the font simply does not have: bold small caps or bold italic small caps in Computer Modern or Latin Modern, slanted or bold typewriter text.
- The OT1 default encoding: several families only provide their full set of shapes in T1 (load
\usepackage[T1]{fontenc}). - A family name that is not installed or misspelled in
\fontfamily{...}, which falls back to the default family. - With XeLaTeX or LuaLaTeX and fontspec, a font installed without its bold or italic files.
How to fix it
Decode the message: OT1/cmr/bx/sc means encoding OT1, family cmr, series bx (bold extended), shape sc (small caps). The second line says what LaTeX used instead. Pick a font family that has the missing shape: TeX Gyre Pagella and Termes (tgpagella, tgtermes) have bold small caps, Latin Modern does not.
If you do not need the combination, remove it: \textsc alone works in the default font. The final Some font shapes were not available line is only a summary and goes away with the individual warnings.
Broken: reproduces the warning
\documentclass{article}
\begin{document}
\textbf{\textsc{Bold Small Caps}} in the default font.
\end{document}Try this in Octree — free LaTeX editor with AI, compiles in your browser
Fixed: compiles cleanly
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tgpagella} % TeX Gyre Pagella has bold small caps
\begin{document}
\textbf{\textsc{Bold Small Caps}} in Pagella.
\end{document}Package fontspec Error: The font "Helvetica Neue Pro" cannot be found.
! Package fontspec Error: The font "Helvetica Neue Pro" cannot be found.
For immediate help type H <return>.
...
l.4 \begin
{document}With XeLaTeX and LuaLaTeX, \setmainfont{Name} looks the font up by name among the fonts installed on the machine that compiles. If no font has that exact name, fontspec stops. Check the name the system reports (on Linux and macOS fc-list | grep -i helvetica), remember that a font installed on your laptop is not installed on a server or online editor, and for portable documents prefer fonts that ship with TeX Live (TeX Gyre Heros, Libertinus Serif, Source Sans Pro) or load the font from files with \setmainfont{MyFont-Regular.otf}[Path=fonts/, BoldFont=MyFont-Bold.otf].
Related errors
- Unicode character not set up for use with LaTeX – pdfLaTeX met a pasted Unicode symbol (≈, →, emoji, CJK) that it has no definition for.
- File not found – A package or class named in
\usepackageor\documentclassis misspelled or not installed. - Option clash for package – A package is loaded twice with different options, often once by another package.
- All LaTeX errors and warnings – The full list, grouped by cause
Frequently Asked Questions
How do I read a font shape like T1/lmr/bx/sc?
It is encoding/family/series/shape. Encoding: OT1, T1 or TU. Family: cmr, lmr, ptm and so on. Series: m (medium), b or bx (bold). Shape: n (upright), it (italic), sl (slanted), sc (small caps).
Why is my bold small caps text not bold small caps?
Because Computer Modern and Latin Modern have no bold small caps. LaTeX warns "Font shape undefined" and falls back to bold upright. Use a family that has them, such as TeX Gyre Pagella, Termes or Libertinus, or the bold-extra package for Computer Modern.
Can I ignore "Some font shapes were not available, defaults substituted"?
The PDF is produced, but some text is set in a different shape from the one you asked for. Scroll up to the individual "Font shape ... undefined" warnings to see which ones, and decide whether the substitute is acceptable.
What does "The font cannot be found" mean in fontspec?
fontspec could not find a font with that name on the system doing the compile. Check the exact name, install the font there, or load it from .otf/.ttf files in your project with the Path option.
Paste your document into Octree — compile errors get a Fix with AI button
When a compile fails, Octree shows the error next to the line that caused it and offers a one-click fix that you can review before applying. Free, nothing to install.
Fix it in Octree →