So I was trying to migrate from LuaTeX to XeTeX in overleaf and when I switched the compiler, It suddenly shows this error:
Package fontspec Error: The font "Tex Gyre Schola" cannot be found.
Why does it happen?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityxetex is less forgiving about errors in the font name.
\setmainfont{Tex Gyre Schola}
should be
\setmainfont{TeX Gyre Schola}
note: X not x