I decided to try using some new fonts and LuaLaTeX, and so I downloaded some fonts and installed them using the instructions from the first answer in this post. I put the setup into my preamble and compilation with LuaTeX worked, but what I got was Computer Modern instead of the installed fonts, so I'm not sure what's happening.
I also tried using mkluatexfontdb --force --verbose=-1 -vvv, but what happened was a mkluatexfontdb: command not found error, so I had to do it all manually by linking the correct folder.
Here is the font part of the setup in my preamble:
% Font / LuaLaTeX setup
\RequirePackage{iftex}
\ifpdftex
\ifluatex
\RequirePackage{fontspec}
\RequirePackage{unicode-math}
\unimathsetup{math-style=TeX}
\RequirePackage[english]{babel}
\defaultfontfeatures{Ligatures=TeX, Scale=MatchLowercase}
\setmainfont[
Path=/usr/share/fonts/opentype/linux-libertine/,
Extension=.otf,
BoldFont=LinLibertine_RB,
ItalicFont=LinLibertine_RI,
BoltItalicFont=LinLibertine_RBI,
]{LinLibertine_R}
\setsansfont[
Path=/mnt/c/Users/user/Appdata/Local/Microsoft/Windows/Fonts, % yes I also added Windows fonts to the font dir and it appears when doing fc-list | grep -i <windows font>
Extension=.otf,
BoldFont=Kurier-Bold,
ItalicFont=Kurier-Italic,
BoldItalicFont=Kurier-BoldItalic,
]{Kurier-Regular}
\setmonofont[
Path=/mnt/c/Users/user/Appdata/Local/Microsoft/Windows/Fonts,
Extension=.ttf,
BoldFont=Inconsolata-Bold,
]{Inconsolata-Regular}
\else
% regular times
\RequirePackage[T1]{fontenc}
\RequirePackage{newtxtext}
\RequirePackage[smallerops]{newtxmath}
\fi
\fi
Perhaps there's something in my preamble that I missed, or perhaps it's something else entirely. If someone knows how to solve this problem, it would be great. Thanks!
\ifswitches right now - I tried something which uses nested\ifand\else, but that could be wrong. – Revise Aug 01 '22 at 17:53mkluatexfontdbit is calledluaotfload-toolbut you rarely need to run it directly, luatex updates its files automatically – David Carlisle Aug 01 '22 at 18:09