[Tex/LaTex] How to install the Calibri font on Latex easily

fontsmacsans-seriftexmaker

I'm using TexMaker on Mac and I'd like to find out how I could install the Calibri font (or other similar font like Open Sans for example) in the easiest possible way. I'm only familiar with the basic functions of Latex…
Thanks for your help.

Best Answer

Calibri is a font created by Microsoft that's distributed with the Windows operating system (since about 2007) and with many Microsoft software products.

Assuming that Calibri is installed on your system, all you need to do to make use of it in your LaTeX document is to (a) compile the document under either XeLaTeX or LuaLaTeX and (b) insert the following two instructions in the preamble of your document:

\usepackage{fontspec}
\setsansfont{Calibri}

If you want to make Calibri the main text font of your document, change \setsansfont{Calibri} to \setmainfont{Calibri}.

enter image description here

Speaking for myself, I happen to quite like Calibri, in large part because it provides a true italic font face (as opposed to just a slanted version of the regular or "upright" font face). This is noticed most easily in the shapes of letters a, e, f, and g.

%% (To be compiled with either XeLaTeX or LuaLaTeX)
\documentclass{article}
\usepackage{fontspec}
\setsansfont{Calibri}
\newcommand\qbf{The quick brown fox jumps over the lazy dog.}
\begin{document}
\textsf{\qbf}

\textit{\textsf{\qbf}}
\end{document}
Related Question