I had a problem compile with XeLaTeX. I got an error: "Package fontspec Error: The font "XITS Math" cannot be found.".

But the XITS Math is installed along with texlive and I can locate the font files:

ls /usr/share/texlive/texmf-dist/fonts/opentype/public/xits/
XITS-Bold.otf  XITS-BoldItalic.otf  XITS-Italic.otf  XITS-Regular.otf  XITSMath-Bold.otf  XITSMath-Regular.otf

Then I found this answer refering the official document:

For XeTeX: on Windows, fonts shipped with TeX Live are automatically made available (by running the fc-cache program provided for Windows as part of TeX Live). For the Mac, you’ll need to consult other documentation. For Unix systems other than macOS, the procedure is the following.

When the xetex package is installed (either at initial installation or later), the necessary configuration file is created in TEXMFSYSVAR/fonts/conf/texlive-fontconfig.conf. To make the TeX Live fonts available as system fonts,

  1. Copy that texlive-fontconfig.conf file to (typically) /etc/fonts/conf.d/09-texlive.conf.
  2. Run fc-cache -fsv.

My problem is that I coundn't even find the file "texlive-fontconfig.conf". I tried to search by filename from the root of my file system and got nothing.


1 Answer 1


As shown in the answer you link to you can use the filename for texlive provided fonts. If you want to use the internal font name, you need to make the directories known to fontconfig



texlive has a template that you can copy but that also adds the type1 font directories that can cause issues so I would only add the truetype and opentype directories as described at the above link, but with updated paths so something like

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .