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?

1 Answer 1


xetex is less forgiving about errors in the font name.

\setmainfont{Tex Gyre Schola}

should be

\setmainfont{TeX Gyre Schola}

note: X not x

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .