Related question: XeLaTeX font rendering tend to be slightly bolder compared to PDFlatex
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"



