summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
committerKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
commitad547a6b5986815fda458221149728d9d9ab1d87 (patch)
tree16296910eb3eca724371474ea9aea3994dc69614 /Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch
parent947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff)
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch')
-rw-r--r--Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch62
1 files changed, 62 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch b/Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch
new file mode 100644
index 00000000000..4772d29494b
--- /dev/null
+++ b/Build/source/texk/web2c/pdftexdir/char-warning-pdftex.ch
@@ -0,0 +1,62 @@
+% $Id$
+% Public domain (from David Jones, tex-implementors 30jun2020).
+% Unfortunately this cannot be in pdftex.ch since the ordering
+% of changes gets messed up.
+%
+% If \tracinglostchars >= 3, then making missing characters from a font
+% be an error, not just a log message, and always report the character
+% code in hex as well as a character.
+%
+% Simple example test:
+% pdftex -ini
+% \font\x=/usr/local/texlive/2020/texmf-dist/fonts/tfm/public/knuth-lib/logo10.tfm
+% \tracinglostchars=3 \x \char99\end
+% should get:
+% ! Missing character: There is no c ("63) in font logo10.
+
+@x [30] If \tracinglostchars > 2, then promote to full error.
+@p procedure char_warning(@!f:internal_font_number;@!c:eight_bits);
+var old_setting: integer; {saved value of |tracing_online|}
+begin if tracing_lost_chars>0 then
+ begin old_setting:=tracing_online;
+ if eTeX_ex and(tracing_lost_chars>1) then tracing_online:=1;
+ begin begin_diagnostic;
+ print_nl("Missing character: There is no ");
+@.Missing character@>
+ print_ASCII(c); print(" in font ");
+ slow_print(font_name[f]); print_char("!"); end_diagnostic(false);
+ end;
+ tracing_online:=old_setting;
+ end;
+end;
+@y
+@p procedure char_warning(@!f:internal_font_number;@!c:eight_bits);
+var old_setting: integer; {saved value of |tracing_online|}
+begin if tracing_lost_chars>0 then
+ begin old_setting:=tracing_online;
+ if eTeX_ex and(tracing_lost_chars>1) then tracing_online:=1;
+ if tracing_lost_chars > 2 then
+ print_err("Missing character: There is no ")
+ else begin
+ begin_diagnostic;
+ print_nl("Missing character: There is no ")
+ end;
+@.Missing character@>
+ print_ASCII(c);
+ if tracing_lost_chars > 2 then begin
+ print(" (");
+ print_hex(c);
+ print(")");
+ end;
+ print(" in font ");
+ slow_print(font_name[f]);
+ if tracing_lost_chars < 3 then print_char("!");
+ tracing_online:=old_setting;
+ if tracing_lost_chars > 2 then begin
+ help0;
+ error;
+ end else end_diagnostic(false);
+ end; {of |tracing_lost_chars>0|}
+end; {of procedure}
+@z
+