TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently started using XeLaTeX on Mac OSX, and was not able to get XeLaTeX to recognize the fonts that I had installed. After opening Font Book, bringing up the Preferences dialog, and opting to install the fonts into the system-level directory (/System/Library/Fonts) instead of the user-level directory (~/Library/fonts), everything worked well.

However, I prefer not to mix the fonts that I download with the fonts that come with the operating system. In the future, I may also wish to have XeLaTeX use fonts in arbitrary directories on my system (say, some subdirectory within a local Git repository). I am very naively guessing that the reason XeLaTeX is not finding my user-level fonts is that they are not in the OS font cache. However, invoking fc-cache on my user-level font directory still does not update the output I get from fc-list with my User fonts.

So, here's my question: how can I get XeLaTeX to use TTF and OTF fonts located in arbitrary directories on my system? Currently, I can only get XeLaTeX to work with System fonts.

Thank you for your insight!

share|improve this question
up vote 4 down vote accepted

fontspec allows setting a path to specific fonts which are not in the current search path (or installed system-wide). This example uses SpecialFont.ttf just after downloading it:

% !TEX TS-program = XeLaTeX



share|improve this answer
Exactly what I was looking for -- thanks a bunch! – void-pointer Sep 6 '12 at 15:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.