LuaLaTeX compiles this fine:

\setmainfont{TeX Gyre Pagella}

XeTeX dies with:

kpathsea:make_tex: Invalid fontname `TeX Gyre Pagella', contains ' '

! fontspec error: "font-not-found"
! The font "TeX Gyre Pagella" cannot be found.
! See the fontspec documentation for further information.
! For immediate help type H <return>.

l.3 \setmainfont{TeX Gyre Pagella}

On my Linux workstation with TexLive, XeTeX compiles this fine. What's going on?

  • Xetex can't find fonts by name in the texmf tree by default (on Linux systems). You will have to adapt your fontconfig setting first. Check the texlive documentation. May 25, 2018 at 6:52

1 Answer 1


Since 2014, MacTeX don't provide a systemwide installation of the TeX Gyre fonts. See this archived page: New features in MacTeX 2014

In previous years, MacTeX contained optional packages to make the Latin-Modern and TeX-Gyre fonts in TeX available to other Mac OS X programs. These are no longer provided because only a few users installed them, and because a better procedure is to create symbolic links in /Library/Fonts to desired opentype TeX fonts in TeX Live.

What you can do is copying TeX Gyre fonts from /usr/local/texlive/2018/texmf-dist/fonts/opentype/public/tex-gyre (here is the path for MacTeX 2018, change the year if necessary) to /Users/_yourName_/Library/Fonts, where _yourName_ is the name of your account on your macOS session. By default, this Library folder is hidden (for security reason, because of some inexperienced macOS users.) But this install the fonts only for your macOS session. If you have several accounts on your Mac, you can also install the fonts in /Library/Fonts on the root of your system.

Note that if you would access via XeLaTeX to any of the truetype or opentype fonts provided by MacTeX, not only the TeX-Gyre fonts, you must copying it either in /Library/Fonts or ~/Library/Fonts.

Opentype fonts are located here (for 2018): /usr/local/texlive/2018/texmf-dist/fonts/opentype.

Truetype fonts are located here (for 2018): /usr/local/texlive/2018/texmf-dist/fonts/truetype.

  • I have a similar problem that I raised in another post: tex.stackexchange.com/q/454309/3063. I have tried copying the fonts to /Library/Fonts to no avail. In my case, I am typing a document that uses Sanskrit 2003.ttf font. This is a general problem - addressing fonts in xelatex when somebody moves from Linux to MacTex
    – jayr
    Oct 8, 2018 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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