[Tex/LaTex] Use Arial in Overleaf

arialoverleafxetex

I'm writting my final degree project in Overleaf, using XeLaTeX.

One of the main requierements is to use Arial font in the entire document.

And here is where the problem begins… I've tried many many different ways to make it work (import my own ttf's, using fontspect, but nothing seems to work).

Right now in the preamble I'm using:

\usepackage{fontspec}
\setmainfont{Arial}

But, if I go to any section, lets say Introduction, the font is still the same… I also have (in a different .tex file) a 'page' acting as a cover page (which I reference in the first page), and still, the text is the same, when I use fontspec and when I don't.

Any help is appreciated, merry christmas y'all.

Best Answer

I had to use:

\setmainfont{Arial}

at the beginning of my document:

\begin{document}
    ...
    \setmainfont{Arial}
    ...
\end{document}
Related Question