Hi, Attached is a patch for pdftex 1.50 (current trunk) that introduces a new integer parameter named \nofontnotfounderror. If this parameter is non-zero, then (pdf)tex will not complain about font metric files that are not found, but silently skip the font assignment, making the requested csname \ifx-equal to \nullfont. The purpose is to allow macro programmers a way to gracefully recover from a missing or differently named font. I am aware there is a trick that uses \batchmode to test for font existance, but the downside of that is that it calls TeX's error() routine, which clobbers the executable's return value. That makes it a no-no in "make"-like environments where the return value of TeX is checked to decide on further actions. This functionality will also be added to the next versions of xetex and luatex (that's why the name does not start with \pdf...). % simple example usage \def\testfont#1{% \font\junk=#1 \ifx\junk\nullfont \message{Font #1 not found} \else \message{Font #1 found} \fi } {\nofontnotfounderror=1 \testfont{cmr-junk} } \bye Best wishes, Taco PS Martin, what is the status on the trackers? I did not know whether to use sarovar or to enable the one on supelec, that's why it is now on the mailing list.
2007/9/17, Taco Hoekwater
PS Martin, what is the status on the trackers? I did not know whether to use sarovar or to enable the one on supelec, that's why it is now on the mailing list.
Use saravor for everything but svn. We will only switch trackers if we can keep our history. Best Martin
Hi, Phil Taylor and I just had an email exchange about the name of the primitive, and after a few messages he convinced me that it is better not to have a double negation in the name because it is not unlikely that will not prevent people from becoming confused. So, here is an updated patch with the new name: \suppressfontnotfounderror Best wishes, Taco Taco Hoekwater wrote:
Hi,
Attached is a patch for pdftex 1.50 (current trunk) that introduces a new integer parameter named \nofontnotfounderror.
If this parameter is non-zero, then (pdf)tex will not complain about font metric files that are not found, but silently skip the font assignment, making the requested csname \ifx-equal to \nullfont.
The purpose is to allow macro programmers a way to gracefully recover from a missing or differently named font.
I am aware there is a trick that uses \batchmode to test for font existance, but the downside of that is that it calls TeX's error() routine, which clobbers the executable's return value. That makes it a no-no in "make"-like environments where the return value of TeX is checked to decide on further actions.
This functionality will also be added to the next versions of xetex and luatex (that's why the name does not start with \pdf...).
% simple example usage \def\testfont#1{% \font\junk=#1 \ifx\junk\nullfont \message{Font #1 not found} \else \message{Font #1 found} \fi }
{\nofontnotfounderror=1 \testfont{cmr-junk} } \bye
Best wishes, Taco
PS Martin, what is the status on the trackers? I did not know whether to use sarovar or to enable the one on supelec, that's why it is now on the mailing list.
------------------------------------------------------------------------
_______________________________________________ ntg-pdftex mailing list ntg-pdftex@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-pdftex
participants (2)
-
Martin Schröder
-
Taco Hoekwater