I am trying to get someone else's thesis template to run, but the EBGaramond font is not working. I also have never used .cls files in latex, so I'm not sure if I'm missing something. In the .cls file, the line causing problems is:
\newfontfamily{\smallcaps}[RawFeature={+c2sc,+scmp}]{EB Garamond}
and the error is: Package fontspec Error: the font ''EB Garamond'' cannot be found
I have tried replacing "EB Garamond" with "ebgaramond" and "EBGaramond".
I followed these directions to make sure the font was installed. To check that it was working, I tried using the command \usepackage{ebgaramond}
in another document, which worked fine, so there seems to be something wrong about the specific line above. Also, I'm not sure if this is relevant, but the previous user of this template was exclusively using Overleaf.
/usr/local/texlive/2021/texmf-dist/fonts/opentype/public/ebgaramond/EBGaramond-Regular.otf
EB Garamond
byEBGaramond-Regular.otf
so the file can be fond by lpathsearch rather than fontconfig (luatex shoud work the same way with either form)