2

I am preparing a document, writing it in RStudio and knitr in a Mac (OS X El Capitan 10.11.2). I would like to use Calibri (to mimic Office documents). I already have a legal version of Microsoft Office on this computer, so having the font should not be an issue. Browsing questions like this was not useful, as the details on my problem are different.

I am trying to compile with XeLaTeX and have:

\usepackage{fontspec}
\setmainfont{Calibri}

in my preamble.

The error message that I get is the following:

enter image description here

Given the fact that I already have a valid copy of Office I thought this should not be a problem.

I am unwilling to mess tremendously with this computer as its my work machine, so a minimal answer should be optimal!

erasmortg
  • 175
  • 2
    Can you reproduce this error with a minimal example outside RStudio? I get no error on my OSX system (but then I'm still on Mavericks). Is Calibri visible in Font Book? – Thruston Jan 12 '16 at 09:06
  • 1
    Yea as @Thruston said I'll first make sure you can see the font in Font Book, and if not try and install it there. Apple Support page for Font Book – McGafter Jan 12 '16 at 09:24
  • @Thruston Calibri is NOT visible in Font Book, but available in Office, I'll try that as a first step – erasmortg Jan 12 '16 at 09:27
  • 1
    @erasmortg Have a look here on Microsoft's site for the font. You might find this post useful to install Calibri on a Mac. Just check your licenses about how these fonts may be used in the MS Office documentation. – McGafter Jan 12 '16 at 09:31
  • Instaling Calibri via Font Book ended up solving the issue, thanks Thurston and @McGafter. I am still unsure why this would be the case, as it is valid in Office... But that's outside the scope of this question, thanks! – erasmortg Jan 12 '16 at 09:34

1 Answers1

2

On Mac OSX systems, XeLaTeX should be able to use any font that is visible to Font Book.app.

If the font you have is not visible in the list, find it in the Finder, and open it with Font Book. You should get a small preview of the font with an "Install Font" button, that you should press to install the font. You might need to do this for each variant of the font.

If the font you want is already in the Font Book list, then check that you have spelled its name correctly, including any capital letters.

Thruston
  • 42,268