LaTeX Font Warning: Font shape `…' in size <…> not available size <…> substituted on input line ….
The warning often occurs if you use the fontsize
option with values other than 10pt
, 11pt
or 12pt
, for example, when using PDFLaTeX, leads:
\documentclass[fontsize=13bp,DIV=calc]{scrbook}
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}
to the warnings:
LaTeX Font Warning: Font shape `OT1/cmss/m/n' in size <13.04874> not available
(Font) size <12> substituted on input line 4.
LaTeX Font Warning: Font shape `OT1/cmss/bx/n' in size <13.04874> not available
(Font) size <12> substituted on input line 4.
LaTeX Font Warning: Font shape `OT1/cmss/bx/n' in size <27.06314> not available
(Font) size <24.88> substituted on input line 4.
LaTeX Font Warning: Font shape `OT1/cmss/bx/n' in size <18.7902> not available
(Font) size <17.28> substituted on input line 4.
LaTeX Font Warning: Font shape `OT1/cmss/bx/n' in size <15.65843> not available
(Font) size <14.4> substituted on input line 4.
LaTeX Font Warning: Font shape `TS1/cmr/m/n' in size <13.04874> not available
(Font) size <12> substituted on input line 4.
LaTeX Font Warning: Font shape `OT1/cmr/m/sl' in size <13.04874> not available
(Font) size <12> substituted on input line 4.
LaTeX Font Warning: Font shape `OT1/cmr/bx/n' in size <13.04874> not available
(Font) size <12> substituted on input line 4.
and the summary:
LaTeX Font Warning: Size substitutions with differences
(Font) up to 2.18314pt have occurred.
The reason for this is that the OT1 encoded standard fonts Computer Modern Roman (cmr
) and Computer Modern SansSerif (cmss
) are only available in discrete sizes in all weights and styles (i.e. medium, bold extended, slanted etc.). However, the sizes requested with fontsize=13bp
starting with 13.04874pt are not available. LaTeX therefore selects other sizes (according to certain rules, including those defined in ot1cmr.fd
) and issues a corresponding warning. By loading a scalable font, for example:
\documentclass[fontsize=13bp,DIV=calc]{scrbook}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{blindtext}
\begin{document}
\blinddocument
\end{document}
the number of warnings is reduced to:
LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <13.04874> not available
(Font) size <12> substituted on input line 2712.
und
LaTeX Font Warning: Font shape `T1/cmr/m/n' in size <13.04874> not available
(Font) size <12> substituted on input line 116.
The first of the two is also irrelevant, as the font reported there is not actually used.
The warnings disappear completely if you use LuaLaTeX for the first example instead, as only scalable fonts are then used by default.