I use different computers with different fonts installed. My favourite font is Frutiger, so whenever it is present at the machine I'm working on, this one should be used. Currently, I'm setting the following switch manually:
\usepackage{ifthen}
\newboolean{frutigerAvailable}
\setboolean{frutigerAvailable}{false}
\ifthenelse{\boolean{frutigerAvailable}}{
% Frutiger available
\setsansfont[]{Frutiger Neue LT W1G}
\setmainfont[
BoldFont={Frutiger Neue LT W1G Bold},
ItalicFont={Frutiger Neue LT W1G Light Italic},
BoldItalicFont={Frutiger Neue LT W1G Bold Italic}]{Frutiger Neue LT W1G Light}
\newfontfamily\headfootfont[]{Frutiger Neue LT W1G Light}
\newfontfamily\titlefont[]{Frutiger Neue LT W1G Medium}
\newfontfamily\titledescriptionfont[]{Frutiger Neue LT W1G Light}
} {
% Frutiger not available, use different font
\setsansfont[]{...}
\setmainfont[
BoldFont={...},
ItalicFont={...},
BoldItalicFont={...}]{...}
\newfontfamily\headfootfont[]{...}
\newfontfamily\titlefont[]{...}
\newfontfamily\titledescriptionfont[]{...}
}
Is there a programmatic way to determine whether a font is present or not on a certain system with LuaTeX?
\suppressfontnotfounderror– David Carlisle Dec 14 '15 at 10:11