Preface
I'm using XeLaTeX and typeset a document using the TeX Gyre Pagella Math font in conjunction with the unicode-math package. This is some sample code
\documentclass{standalone}
\usepackage{unicode-math}
\setmathfont{TeX Gyre Pagella Math}
\begin{document}
$a^2 + b^2 = c^2$
\end{document}
I use Debian GNU/Linux on my machine with a "vanilla" TeXLive. For me the above example compiles all fine, but when a friend of mine, who is using Ubuntu GNU/Linux with texlive-full from the official repositories tried to compile it, he encountered font-not-found errors.
It turned out, that the font is installed on his system, but is named TG Pagella Math instead of TeX Gyre Pagella Math.
Question
How do I implement a switch between two fontnames in XeLaTeX using unicode-math? See my pseudo-code for better visualisation
...
\usepackage{unicode-math}
\IFDEF UBUNTU
\setmathfont{TG Pagella Math}
\ELSE
\setmathfont{TeX Gyre Pagella Math}
\ENDIF
...
fontspec– egreg Jun 11 '13 at 21:04