[XeTeX] Checking if a font exists

Jonathan Kew jfkthame at googlemail.com
Mon Aug 30 09:22:53 CEST 2010

On 30 Aug 2010, at 05:56, Wilfred van Rooijen wrote:

> The (more dificult) solution could be to make a shell script which will run the compilation of the xelatex source and detect whether or not the run was succesfull - if not, change the input file to the other font and retry.

I'm surprised no-one has suggested the straightforward, pure-xetex approach: something along these lines (untested).....

  \def\myfont{"Myriad Pro"}
  \font\foo=\myfont\space at 10pt
    \font\foo = \myfallback\space at 10pt
      \errmessage{no suitable font found}
  % and now proceed to use \myfont.....


More information about the XeTeX mailing list