[XeTeX] Test for font presence

Ron Aaron ron at ronware.org
Mon May 9 21:15:27 CEST 2011


Came up with the following:

    \newif\iffontexists
    \def\fontexists#1{
       \fontexistsfalse
       \batchmode
       \font\tstfnt="#1"
       \errorstopmode
       \ifnum\strcmp{\fontname\tstfnt}{"#1"}=0
          \fontexiststrue
       \fi
    }




It works, but is there an easier way?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110509/e910700d/attachment.html>


More information about the XeTeX mailing list