1

I would like to use Calibri in my LaTeX document. As this is not one of the basic fonts, I downloaded the Calibri package for Windows and added it to my file path (see picture).

enter image description here

Following the answers in this thread : How to use the Calibri font I changed the compiler to lualatex and added the following code:

\usepackage{fontspec}
\setmainfont[
BoldItalicFont=calibriz.ttf,
BoldFont      =calibrib.ttf,
ItalicFont    =calibrii.ttf]{calibri.ttf}

This results in the following error: "Timed out. Sorry, your compile took too long to run and timed out. This may be due to a LaTeX error, or a large number of high-res images or complicated diagrams."

Without the above code the file is not in Calibri, but compiles in only a couple seconds.

Ingmar
  • 6,690
  • 5
  • 26
  • 47

1 Answers1

1

Following the guide on overleaf I have a custom font I'd like to load to my document. How can I do this? this code compiles:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{calibri}[ 
    Extension = .ttf,
    UprightFont = *,
    BoldItalicFont=*z.ttf,
    BoldFont      =*b.ttf,
    ItalicFont    =*i.ttf
]

\begin{document}
text \textbf{bold} \textit{italic} \textbf{\textit{bolditalic}}
\end{document}

(However, it did also time out three times before it worked for me, at first... Subsequent compiles seem to work fine.)

TivV
  • 743