# Figuring out Xetex fonts under Debian

I have been trying to start using xelatex.

My configuration:

Debian: testing
Texlive: 2013.20140408-1


Taking the minimal example from

\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmathfont{XITS Math}
\usepackage{xltxtra}

\begin{document}

$$α = \beta^2_i + β^2_i$$

\end{document}


and running xelatex on it I get:

kpathsea:make_tex: Invalid fontname XITS Math/ICU', contains ' '

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

l.4 \setmathfont{XITS Math}

?


With some help from comp.text.tex, I tried replacing the: \setmathfont{XITS Math} with

\setmathfont{XITS}

\setmathfont{xits-math}

None of this worked until I tried: \setmathfont{xits-math.otf}

Can you point me someplace where I can study how to specify xetex fonts under debian?

I was pointed to: texdocs which is evidently needed for linux users. However, the file which I am supposed to copy to /etc:

/var/lib/texmf/fonts/conf/texlive-fontconfig.conf does not exist on my system.

So, in addition to figuring out how to handle xetex fonts in debian, my more general question is:

Would you recommend that I dump Debian's texlive and move to a CTAN download?

• When you say texlive wich package have you installed? texlive-full or another one? texlive-full have all the package, doc, fonts, and so you can found on debian distrib Jun 5, 2014 at 7:28
• Welcome to TeX.SX! Your TeX Live seems to be 2013, so there's no compelling reason to use the “vanilla” one (although I'd prefer to). Did you try something like fc-list | sed '/:.*\$/s///' that should print on the terminal the list of available fonts? Jun 5, 2014 at 7:39
• @RomainPicot I dont have texlive-full just texlive. If using full is recommended I'll do that. I was just avoiding considering that anyway I'll need to go for the CTAN one.
– Rusi
Jun 5, 2014 at 9:28
• @egreg: Yes I know (somewhat) about fc-list. My question was more of the nature of the where/what/how of matching (xe)tex's notions of fonts to the system's notion(s)
– Rusi
Jun 5, 2014 at 9:31
• The Debian TeX Live should take care of texlive-fontconfig.conf by itself; you should find something in /etc/fonts Jun 5, 2014 at 11:41

I'm currently on Debian (testing), where I installed a full TeX Live with

apt-get install texlive-full


From what I can get, it seems that only some fonts are made visible to the system with an entry in /etc/fonts/conf.d

The relevant entries are

/etc/fonts/conf.d/65-fonts-lmodern.conf
/etc/fonts/conf.d/65-fonts-persian.conf
/etc/fonts/conf.d/65-fonts-texgyre.conf


and, indeed, if I try

\setmainfont{Latin Modern Roman}


or

\setmainfont{TeX Gyre Termes}


I get what's expected, because these fonts have been made known to the OS. Unfortunately, probably due to time limitation on the maintainer of TeX Live/Debian (our heroic Norbert Preining), only some font families are registered in /etc/fonts/conf.d

If you install a full vanilla TeX Live from TUG, then the method of adding the provided configuration file to /etc/conf.d should allow you to call all fonts by name. Fonts not made known to the OS must be called by file name, I'm afraid.

• "Unfortunately, probably due to time limitation on the maintainer of TeX Live/Debian (our heroic Norbert Preining), only some font families are registered in /etc/fonts/conf.d" Is this worth a bug report, or does this fall into the category of "Will not Fix"? May 2, 2018 at 21:00
• @FaheemMitha Ask Norbert. May 2, 2018 at 21:09
• @egreg thanks for the flowers, but it is less time constraints then difficulty to select a definitive list of fonts to be activated. Furthermore, since I am expelled from Debian now I am not sure how much will happen in the future. Political Games. Jan 22, 2019 at 15:13

The answers given are already more or less the truth: Fonts shipped in /usr/share/texlive/texmf-dist are not made available automatically to fontconfig on Debian. Adding all fonts by simply adding the respective truetype/opentype directories to the fontconfig path is unfortunately a no-go, since some fonts would break the rest of the system (duplicate names, broken format, lots of problems).

What one could do it select certain fonts and make those available, but which fonts would one select? Debian has so many use cases and selecting only some fonts based on personal preference is sub-optimal and would probably only increase the confusion ("why is font A available and font B not?").

The simple solution and the one I am taking on my own computer is to add a file /etc/fonts/local.conf that contains those directories I want to activate, in my case:

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