# How to use EB Garamont Font with KOMA Script Font Size 16pt

I am using the ebgaramond package in my scrbook document. As a base font size I want to use 16pt but when I compile the document I get warnings like the following:

LaTeX Font Warning: Font shape OT1/cmr/m/n' in size <16> not available (Font) size <17.28> substituted on input line 2251.

[...]

LaTeX Font Warning: Font shape OML/eur/m/n' in size <13.3335> not available (Font) size <14.4> substituted on input line 7.

[...]

LaTeX Font Warning: Font shape OML/eur/m/n' in size <27.64795> not available (Font) size <24.88> substituted on input line 1.

(and so forth...)

I read another answer here, suggesting to use the lmodern package for freely scalable fonts, but (i figure) since this is specific to certain fonts, not including EB Garamond, this did not help.

So I have two questions:

1) Obviously: What should I do to resolve this?

2) Why does it happen in the first place? Shouldn't stuff like this be one of LaTeX's stengths? -- You just select a new base font size and, boom, everything is adjusted accordingly?

EDIT: The solution suggested below (\RequirePackage{fix-cm}) is in principle correct. It turned out, there was yet one more issue with using both SIunits and scrlayer-scrpage at a time. Can you tell me why that is or how it could be resolved?

M(n)WE:

\RequirePackage{fix-cm}
\documentclass[a4paper, fontsize=16pt, DIV=12]{scrbook}
\usepackage[lining]{ebgaramond}
% The following two do not like each other -- it works with either of them, but not with both o_O
\usepackage[amssymb]{SIunits}
\usepackage[automark]{scrlayer-scrpage}

\begin{document}
\chapter{Hi}
\section{There}
\subsection{Folks}
This is an MWE.
\end{document}

• Probably ebgaramond is scalable in Cork encoding, so try \usepackage[T1]{fontenc}. – Henri Menke May 16 '16 at 18:37
• @Henri Menke Thanks, I already have that in my header -- so that's not the reason. – stack_horst May 16 '16 at 18:48
• Can you please add a MWE? – egreg May 16 '16 at 20:34
• None of those warnings concern EB Garamond. – cfr May 17 '16 at 1:10

You will get these warnings if you are using option fontsize=16pt before setting a scalable font.

To avoid the warnings you can load package fix-cm before the document class. Then the default font will be also scalable.

\RequirePackage{fix-cm}
\documentclass[fontsize=16pt,DIV=calc]{scrbook}
\usepackage{ebgaramond}

\begin{document}
Textt
\end{document}


Or you can first load the font and then set the fontsize:

\documentclass[DIV=calc]{scrbook}

\usepackage{ebgaramond}
\normalfont
\KOMAoptions{fontsize=16pt}
\recalctypearea% recalculate the page layout with the changed font settings

\begin{document}
Text
\end{document}


But note that there could be packages using the font size that is set as class option (or its default value). So setting fontsize=16pt as class option would be the recommended way.

Update regarding the updated question

In package siunits you can find the lines

\DeclareFontFamily{OML}{eur}{\skewchar\font127} \DeclareFontShape{OML}{eur}{m}{n}{<5> <6>
<7> <8> <9> gen * eurm <10><10.95><12><14.4><17.28><20.74><24.88>eurm10}{}
\DeclareSymbolFont{greek}{OML}{eur}{m}{n}
\DeclareMathSymbol{\upmu}{\mathord}{greek}{"16}


So it seems to me that there is a non scalable font used for \upmu producing the warning

LaTeX Font Warning: Font shape OML/eur/m/n' in size <16> not available (Font) size <17.28> substituted on input line 13.

Note that I get the same warning (only the line number differs) if I comment scrlayer-scrpage but use \upmu:

\RequirePackage{fix-cm}
\documentclass[a4paper, fontsize=16pt, DIV=12]{scrbook}
\usepackage[lining]{ebgaramond}
%The following two do not like each other -- it works with either of them, but not with both o_O
\usepackage[amssymb]{SIunits}
%\usepackage[automark]{scrlayer-scrpage}

\begin{document}
\chapter{Hi}
\section{There}
\subsection{Folks}
This is an MWE. $\upmu$
\end{document}


And note that siunits is su­per­seded by siu­nitx.

• If I make my document into a MWE (just \documentclass[a4paper, fontsize=16pt, twoside, fleqn, bibliography=totoc, headings=optiontohead]{scrbook}, \usepackage[a4paper, top=1.9cm, bottom=1.6cm, inner=3.2cm, outer=2.5cm, includehead, headsep=\baselineskip, includefoot]{geometry}, \usepackage[lining]{ebgaramond} and some Headers and text) then this is indeed the solution. Without the fix-cm I do get these warnings, with it I don't. It still does not help for my real document though, so I will have to figure out which additional packages are the troublemakers. (any general ideas? ;)) – stack_horst May 18 '16 at 7:23
• found them... see my edited question above – stack_horst May 18 '16 at 8:01
• See my updated answer. – esdd May 19 '16 at 0:04