# Why is “Latin Modern Roman” appearing differently in TeXStudio than in SumatraPDF?

I am trying to use lualatex, because of the selnolig package.

I was recommended to use "Latin Modern Roman" instead of "cfr-lm" in the case of LuaLaTeX (see somehow How to use selnolig package together with default lualalatex font?). Note that lmodern is in the basic mode equal to cfr-lm. See Difference between cfr-lm and lm package.

% !TeX program = pdflatex
\documentclass{article}
\usepackage{blindtext}

\usepackage{ifluatex}
\ifluatex
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}
\else
\usepackage{lmodern}
\fi

\begin{document}
\blindtext
\end{document}


## TexStudio

Rendered output with pdflatex in TeXStudio on Windows 10:

Rendered output with lualatex in TeXStudio on Windows 10:

See that the lualatex output is thicker? How to have the output being rendered in equal thickness?

## SumatraPDF

Rendered output in SumatraPDF:

The other equivalent font settings are as follows (see What ist the fontspec equivalent for "variable=true"):

\setsansfont{Latin Modern Sans}
\setmonofont{Latin Modern Mono} % "variable=false"
%\setmonofont{Latin Modern Mono Prop} % "variable=true"

• Is it really thicker or is it just artefact of different rendering and presence/absence (?) of hinting in one or the other? – wilx Mar 26 '18 at 13:12
• latin modern is the default font family in lualatex so you don't need do anything at all. – David Carlisle Mar 26 '18 at 13:12
• Note that pdflatex is using the type1 font format and lualatex the opentype format, the two versions of the font are derived from the same glyph definitions but the exact appearance in any particular rendering system may have slight variations depending on how font hinting and other things are implemented for each of the two formats. – David Carlisle Mar 26 '18 at 13:21
• @wilx and DavidCarlisle I changed the question title, so you can convert your comment to an answer. – koppor Mar 26 '18 at 13:32
• Related, maybe duplicate tex.stackexchange.com/questions/305258/… – Henri Menke Mar 26 '18 at 23:31

latin modern is the default font family in lualatex so you don't need do anything at all, you would get the same font without loading fontspec or specifying \setmainfont.