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,
- Copy that texlive-fontconfig.conf file to (typically) /etc/fonts/conf.d/09-texlive.conf.
- 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.