Skip to content
Snippets Groups Projects
Commit 84330213 authored by Luigi Scarso's avatar Luigi Scarso
Browse files

more granularity in \tracingfonts (HH)

[[Split portion of a mixed commit.]]
parent 1dd06603
Branches
Tags
No related merge requests found
......@@ -891,6 +891,20 @@ ignores the value.
This allows for embedded spaces, without the need for double quotes. Macro
expansion takes place inside the argument.
The \type {\tracingfonts} primitive that has been inherited from \PDFTEX\ has
been adapted to support variants in reporting the font. The reason for this
extension is that a csname not always makes sense. The zero case is the default.
\starttabulate[|T||]
\NC 0 \EQ \type{\foo xyz} \NC \NR
\NC 1 \EQ \type{\foo (bar)} \NC \NR
\NC 2 \EQ \type{<bar> xyz} \NC \NR
\NC 3 \EQ \type{<bar @ ..pt> xyz} \NC \NR
\NC 4 \EQ \type{<id>} \NC \NR
\NC 5 \EQ \type{<id: bar>} \NC \NR
\NC 6 \EQ \type{<id: bar @ ..pt> xyz} \NC \NR
\stoptabulate
\subsection{Writing to file}
You can now open upto 127 files with \type {\openout}. When no file is open
......
No preview for this file type
......@@ -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(')');
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment