[lltx] \textit changes font size with LM fonts
Ulrike Fischer
news3 at nililand.de
Wed May 11 15:24:14 CEST 2011
Am Tue, 10 May 2011 20:56:25 +0200 schrieb Stephan Hennig:
> Hi,
>
> I'm observing an odd behaviour with the Latin Modern Roman and Sans
> fonts. In the attached example the second instance of italic text is
> typeset at a smaller font size than the surrounding text.
>
> The problems doesn't exhibit with fonts other that LM Roman or LM Sans
> or if either \tableofcontents or \mainmatter is removed.
>
> Can you reproduce the problem?
Yes. It has obviously to do with the fact that the fonts exist in
more than one size. lualatex reloads the fonts after a newpage and
then sometimes gets the wrong size (I could reproduce it with 10pt
and 12pt class options but not with 11pt).
I suspect a fontspec bug as one can trigger the wrong font size by
using \textsl. (fontspec handles slanted and italic in a specific
way):
\documentclass[12pt]{book}
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}
\newcommand*{\test}{foo \textit{bar} \textsl{cde} \textit{bar} foo}
\begin{document}
\test
\end{document}
--
Ulrike Fischer
More information about the lualatex-dev
mailing list