3

I am using Luatex and KOMA-script. I have the issue that the italic font is consistently set to size 10pt it seems, and I don't understand it. In my M(not)WE below, the issue is present, but it isn't when removing the line that loads the scrlayer-scrpage package or removing the \clearpage. I'm not using the package in this example to keep it simple, but in my main document I want to use it. What is going on here? Also, this issue doesn't happen for most other fonts.

\documentclass[a4paper, 12pt]{scrreprt}

%%%%%%%%%%%%%%% load packages %%%%%%%%%%%%%%%
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}

%%%%% Head and Footnotes %%%%%
\usepackage[]{scrlayer-scrpage}

%%%%%%%%%%%%%%% begin of document %%%%%%%%%%%%%%%
\begin{document}
Some Text
\clearpage  % or cleardoublepage or newpage, all produce the problem
This is a text in normalsize. \emph{This appears smaller than it should. }\textit{This appears too small as well.}\\
Look at the size of Letters: u\emph{u}\textit{u}

\end{document}
10
  • 1
    It is being set to \small for the header/footer (and then somehow "leaking" into the document body text). Reset it with \setkomafont{pageheadfoot}{\normalfont\normalcolor\itshape} - but that is not a fix.
    – Cicada
    Jun 24 at 12:08
  • 1
    You don't need \setmainfont{Latin Modern Roman} because this is the default. And if you remove it, again LMRoman12-Italic is used instead of LMRoman10-Italic.
    – cabohah
    Jun 24 at 12:11
  • 1
    \setmainfont[ItalicFont=LMRoman12-Italic.otf]{Latin Modern Roman}
    – cabohah
    Jun 24 at 12:36
  • 1
    BTW: Strange enough, scrlayer-scrpage doesn't even use the italic font, it just uses \slshape, which should be the slanted font. And indeed \setmainfont[SlantedFont=LMRomanSlant12-Regular.otf]{Latin Modern Roman} also helps to switch back to LMRoman12-Italic. So it seems to be a problem with the automatic font mapping of fontspec. But currently I do not know the trigger.
    – cabohah
    Jun 24 at 13:03
  • 1
    @Cicada AFAIK scrlayer-scrpage does not use \small by default.
    – cabohah
    Jun 24 at 13:17

1 Answer 1

6

Fonts with optical sizes are sometimes a bit complicated. Declare the slanted font explicitly:

\documentclass[a4paper, 12pt]{scrreprt}

%%%%%%%%%%%%%%% load packages %%%%%%%%%%%%%%%
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}[SlantedFont=LatinModernRoman/I]

%%%%% Head and Footnotes %%%%%
\usepackage[]{scrlayer-scrpage}

%%%%%%%%%%%%%%% begin of document %%%%%%%%%%%%%%%
\begin{document}
Some Text
\clearpage  % or cleardoublepage or newpage, all produce the problem
This is a text in normalsize. \emph{This appears smaller than it should. }\textit{This appears too small as well.}\\
Look at the size of Letters: u\emph{u}\textit{u}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .