[ pdftex-Patches-864 ] \suppressfontnotfounderror patch
Patches item #864, was opened at 2007-09-17 17:49 You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=495&aid=864&group_id=106 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Taco Hoekwater (taco) Assigned to: Nobody (None) Summary: \suppressfontnotfounderror patch Initial Comment: Attached is a patch for pdftex 1.50 (current trunk) that introduces a new integer parameter named \suppressfontnotfounderror. 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 } {\suppressfontnotfounderror=1 \testfont{cmr-junk} } \bye ---------------------------------------------------------------------- You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=495&aid=864&group_id=106
participants (1)
-
noreply@sarovar.org