summaryrefslogtreecommitdiff
path: root/info/digests/ttn/fonttab.tex
blob: 1ea5c25b95f8dc6a89e9c66f6a8f70906e4df5e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
%% The following file was referenced in TTN 2,1:13 (Ch. Thiele)
%%

% File FONTTAB.TEX
% English version last revised on  27 febr. 1995
%
% Claudio Beccari -- Dipartimento di Elettronica
% Politecnico di Torino,  Torino, Italy
%
% Purpose:
% The program prepares a table of all the font characters in a 
% 128-symbol table similar to the ones that appear in the TeXbook
%
% Instructions at the end
%
\documentstyle{article}
\makeatletter
\newcount\Nfont \Nfont=1 \newtoks\Mfont %\newtoks\nomefont
\def\Stop{stop}
\def\introduci{\typeout{}\typeout{}
\typein[\Font]{Font name [to finish enter stop] }
\ifx\Font\Stop\let\NeXt\stop\else\let\NeXt\tabella\fi
\NeXt}
\newcount\bEc

{%
\catcode`\"=\active
\catcode`\;=\active
\catcode`\'=\active
\gdef'{\tt\char39\relax}
\gdef"{\tt\char34\relax}
\gdef;{\char\bEc\global\advance\bEc by 1&}
\gdef\MakeActive{\catcode`\"=\active \catcode`\;=\active \catcode`\'=\active}
\gdef\dline#1#2#3{'#1&;;;;;;;;\cr
                 \multispan9{\hrulefill}&\raisebox{-0,6ex}[0pt][0pt]{"#3}\cr
                 '#2&;;;;;;;;\cr\hline}
\gdef\firstline{  & '0 & '1 & '2 & '3 & '4 & '5 & '6 & '7 &  \cr }
\gdef\lastline{   & "8 & "9 & "A & "B & "C & "D & "E & "F & }
}


\def\tabella{\newpage
\Mfont=\expandafter{\romannumeral\Nfont}
\edef\nomefont{font\the\Mfont}
\edef\nomefont{\expandafter\csname\nomefont\endcsname}
\expandafter\font\nomefont=\Font
\begin{center}\nomefont
\MakeActive
\bEc=0  
\def\arraystretch{1.3}
%
\makebox[0pt]{%
\begin{tabular}{@{}c|*8{c|}c@{}}
\firstline
\hline
\dline{00}{01}{0}
\dline{02}{03}{1}
\dline{04}{05}{2}
\dline{06}{07}{3}
\dline{10}{11}{4}
\dline{12}{13}{5}
\dline{14}{15}{6}
\dline{16}{17}{7}
\lastline
\end{tabular}}
\par
\bigskip
{\rm Font: \Font.}\\[20pt]
ABCDEFGHIJKLMNOPQRSTUVWXYZ \\
abcdefghijklmnopqrstuvwxyz
\end{center}\advance\Nfont 1\introduci}

\begin{document}
\introduci
\end{document}
%
%
% It runs under LaTeX and is interactive so as to let you prepare
% as many font tables as you whish in just one run
%
% Usage:
% Run the program by entering
%
% latex fonttab
%
% The program will prompt you for a font name:
%
% Font name [to finish enter stop]
% \Font=
%
% Enter the font name you want to try, for example cmu10
%
% The program will produce the font table corresponding to the chosen font
% and will ask you another font name; keep entering as many font names you
% want and finish by entering the word stop at the font name prompt.
% That's it.			       ^^^^
%
% When you have your .dvi file "fonttab.dvi"  print it by means of
% your printer driver. Be aware that you might have the font metric file (.tfm)
% for the chosen font, but you might lack the corresponding pixel files, so
% that your table will be empty or contain a subtitution font according to
% your setup.