summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/tex/printing.w
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2018-01-09 23:43:20 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2018-01-09 23:43:20 +0000
commitaa5d0e8bf3515c424ba0594a2d4e06ae31da7796 (patch)
treee56fd10d89732547ddb207c1998a1ded4360382e /Build/source/texk/web2c/luatexdir/tex/printing.w
parentd33684eeca435784c95c62c7981dd02f7818b263 (diff)
Imported Luatex 1.06.3 (Lua 5.2.4)
git-svn-id: svn://tug.org/texlive/trunk@46269 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex/printing.w')
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/printing.w67
1 files changed, 54 insertions, 13 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/printing.w b/Build/source/texk/web2c/luatexdir/tex/printing.w
index 006392810b9..72444156480 100644
--- a/Build/source/texk/web2c/luatexdir/tex/printing.w
+++ b/Build/source/texk/web2c/luatexdir/tex/printing.w
@@ -838,25 +838,66 @@ int font_in_short_display; /* an internal font number */
sort of ``complicated'' are indicated only by printing `\.{[]}'.
@c
+
+/*
+So, 0, 1 as well as any large value will behave the same as before. The reason
+for this extension is that a \name not always makes sense.
+
+0 \foo xyz
+1 \foo (bar)
+2 <bar> xyz
+3 <bar @@ ..> xyz
+4 <id>
+5 <id: bar>
+6 <id: bar @@ ..> xyz
+
+*/
+
void print_font_identifier(internal_font_number f)
{
str_number fonttext;
fonttext = font_id_text(f);
- if (fonttext > 0) {
- print_esc(fonttext);
+ if (tracing_fonts_par >= 2 && tracing_fonts_par <= 6) {
+ /* < > is less likely to clash with text parenthesis */
+ tprint("<");
+ if (tracing_fonts_par >= 2 && tracing_fonts_par <= 3) {
+ print_font_name(f);
+ if (tracing_fonts_par >= 3 || font_size(f) != font_dsize(f)) {
+ tprint(" @@ ");
+ print_scaled(font_size(f));
+ tprint("pt");
+ }
+ } else if (tracing_fonts_par >= 4 && tracing_fonts_par <= 6) {
+ print_int(f);
+ if (tracing_fonts_par >= 5) {
+ tprint(": ");
+ print_font_name(f);
+ if (tracing_fonts_par >= 6 || font_size(f) != font_dsize(f)) {
+ tprint(" @@ ");
+ print_scaled(font_size(f));
+ tprint("pt");
+ }
+ }
+ }
+ print_char('>');
} else {
- tprint_esc("FONT");
- print_int(f);
- }
- if (tracing_fonts_par > 0) {
- tprint(" (");
- print_font_name(f);
- if (font_size(f) != font_dsize(f)) {
- tprint("@@");
- print_scaled(font_size(f));
- tprint("pt");
+ /* old method, inherited from pdftex */
+ if (fonttext > 0) {
+ print_esc(fonttext);
+ } else {
+ tprint_esc("FONT");
+ print_int(f);
+ }
+ if (tracing_fonts_par > 0) {
+ tprint(" (");
+ print_font_name(f);
+ if (font_size(f) != font_dsize(f)) {
+ tprint("@@");
+ print_scaled(font_size(f));
+ tprint("pt");
+ }
+ print_char(')');
}
- print_char(')');
}
}