I recently installed LuaLaTeX and I want to change the font. I found this answer on this site describing different ways to include fonts and with which flavors of TeX they should work with.
I have reproduced the first example below, which according to the answer should work with pdflatex and lualatex.
\documentclass{article}
\usepackage{lmodern}
\renewcommand{\sfdefault}{cmbr}
\begin{document}
The quick brown fox jumps over the lazy dog.
\sffamily
The quick brown fox jumps over the lazy dog.
\end{document}
However, the second lines appears the same for me (no change in font) when I use lualatex.
I have been compiling with pdflatex test.tex and lualatex test.tex. Am I missing an option for lualatex that will help with the font? When I compile with lualatex I get the following warning.
LaTeX Font Warning: Font shape `TU/cmbr/m/n' undefined
(Font) using `TU/lmr/m/n' instead on input line 7.
I also went ahead and installed texlive-full just to be sure I wasn't missing some font package, but I still get the same warning and consequently no change in font.
texdoc fntguidewhich explains whatsfdefaultdo, then findcmbris the family name for the "computer modern bright" font. Meanwhile\usepackage{cmbright}gives an error... – user202729 Jan 12 '23 at 03:38cmbrightpackage e.g. on some Linux distribution I think you need to installtexlive-fontsextrapackage. – user202729 Jan 12 '23 at 03:40\usepackage[T1]{fontspec}. Is there a benefit to the TU encoding? I did a quick google search on it, but I could not find much information. – nikost Jan 12 '23 at 15:49