[XeTeX] Checking if a font exists
Heiko Oberdiek
heiko.oberdiek at googlemail.com
Mon Aug 30 20:50:12 CEST 2010
On Mon, Aug 30, 2010 at 04:50:56PM +0100, Philip Taylor (Webmaster, Ret'd) wrote:
> Akira Kakuto wrote:
>
> >Thanks. There is a difference between
>
> >\suppressfontnotfounderror0
> >
> >and
> >
> >\suppressfontnotfounderror1
>
> I think it might be helpful for those unfamiliar with
> the most terse form of TeX syntax to explain that these
> are more conventionally written :
>
> > \suppressfontnotfounderror = 0
> >
> > and
> >
> > \suppressfontnotfounderror = 1
>
> i.e., one variable, two possible values to be assigned,
> rather than (as some less experienced TeXxies might
> conceivably think) two variables differing subtly in name ...
Also in a real application the previous value should be
saved, then the setting to zero follows and after the
font business the old value is restored. There are many
ways to do it, e.g.
* Doing the font business inside a group, then
TeX will restore the old value automatically
after the group.
* \edef\RestoreSuppressFontNotFoundError{%
\suppressfontnotfounderror=\the\suppressfontnotfounderror\relax
}%
\suppressfontnotfounderror=0 %
% font business
\RestoreSuppressFontNotFoundError
Yours sincerely
Heiko Oberdiek
More information about the XeTeX
mailing list