summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/texsis/base/printfont.txs
blob: cef598668c8424b36a1c4ead40feb5323f8b77c5 (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
105
106
107
108
109
110
111
112
113
114
115
116
%% file: printfont.txs                              TeXsis version 2.16
%  $Revision: 16.0 $  :  $Date: 1992/08/08 22:20:36 $  :  $Author: myers$
%======================================================================*
%       \printfont{<name><description>} prints a table showing font
% <name>. <description> should be something like "Roman"

\catcode`\@=11
\newdimen\sidedimen
\setbox0\hbox{\tenrm\char'175 \tt0} \sidedimen=\ht0 \divide\sidedimen2

\def\oddrule#1{\multispan{18}\leaders\hrule\hfill&\omit\hbox to 40pt{\hfill
  \smash{\lower\sidedimen\hbox{\tenrm\char'175 \tt#1x}}%
  \hfill}\cr}

\def\extra{&height4pt&\omit&&\omit&&\omit&&\omit&&\omit&&\omit&&\omit
    &&\omit&\cr}
\def\hvi{\hskip6pt plus 1fill\relax}

%-----------------
%       \printfont#1 prints a table of font #1.
%       (this should get moved to a style file or something)

\newcount\charcount\charcount\z@
%\def\gloop#1\repeat{\gdef\body{#1}\iterate}

\def\printfont#1{%
  \begingroup
  \offinterlineskip
  \charcount\z@
  \def\f@nt{#1}                                 % font name
  \font\F@nt=\f@nt                              % use this font in table
  \halign to\hsize{\hbox to40pt{\hfill##\hfill}&
    \vrule##\tabskip\centering
    &\hvi\F@nt##\hvi
    &\vrule##&\hvi\F@nt##\hvi&\vrule##&\hvi\F@nt##\hvi&\vrule##&\hvi\F@nt##\hvi
    &\vrule##&\hvi\F@nt##\hvi&\vrule##&\hvi\F@nt##\hvi&\vrule##&\hvi\F@nt##\hvi
    &\vrule##&\hvi\F@nt##\hvi&\vrule##\tabskip0pt&##\cr
    \omit&height12pt&\gloop\it'\number\charcount&height12pt&\ifnum\charcount<7
    \global\advance\charcount1 \repeat\cr
    \extra\noalign{\hrule}\extra\noalign{\global\charcount\z@}
    \it'00x&&
    \gloop\char\charcount&&\ifnum\charcount<7 \global\advance\charcount1
    \repeat\cr
    \extra\oddrule0\extra\noalign{\global\advance\charcount1 }
    \it'01x&&
    \gloop\char\charcount&&\ifnum\charcount<15 \global\advance\charcount1
    \repeat\cr
    \extra\noalign{\hrule}\extra\noalign{\global\advance\charcount1 }
    \it'02x&&
    \gloop\char\charcount&&\ifnum\charcount<23 \global\advance\charcount1
    \repeat\cr
    \extra\oddrule1\extra\noalign{\global\advance\charcount1 }
    \it'03x&&
    \gloop\char\charcount&&\ifnum\charcount<31 \global\advance\charcount1
    \repeat\cr
    \extra\noalign{\hrule}\extra\noalign{\global\advance\charcount1 }
    \it'04x&&
    \gloop\char\charcount&&\ifnum\charcount<39 \global\advance\charcount1
    \repeat\cr
    \extra\oddrule2\extra\noalign{\global\advance\charcount1 }
    \it'05x&&
    \gloop\char\charcount&&\ifnum\charcount<47 \global\advance\charcount1
    \repeat\cr
    \extra\noalign{\hrule}\extra\noalign{\global\advance\charcount1 }
    \it'06x&&
    \gloop\char\charcount&&\ifnum\charcount<55 \global\advance\charcount1
    \repeat\cr
    \extra\oddrule3\extra\noalign{\global\advance\charcount1 }
    \it'07x&&
    \gloop\char\charcount&&\ifnum\charcount<63 \global\advance\charcount1
    \repeat\cr
    \extra\noalign{\hrule}\extra\noalign{\global\advance\charcount1 }
    \it'10x&&
    \gloop\char\charcount&&\ifnum\charcount<71 \global\advance\charcount1
    \repeat\cr
    \extra\oddrule4\extra\noalign{\global\advance\charcount1 }
    \it'11x&&
    \gloop\char\charcount&&\ifnum\charcount<79 \global\advance\charcount1
    \repeat\cr
    \extra\noalign{\hrule}\extra\noalign{\global\advance\charcount1 }
    \it'12x&&
    \gloop\char\charcount&&\ifnum\charcount<87 \global\advance\charcount1
    \repeat\cr
    \extra\oddrule5\extra\noalign{\global\advance\charcount1 }
    \it'13x&&
    \gloop\char\charcount&&\ifnum\charcount<95 \global\advance\charcount1
    \repeat\cr
    \extra\noalign{\hrule}\extra\noalign{\global\advance\charcount1 }
    \it'14x&&
    \gloop\char\charcount&&\ifnum\charcount<103 \global\advance\charcount1
    \repeat\cr
    \extra\oddrule6\extra\noalign{\global\advance\charcount1 }
    \it'15x&&
    \gloop\char\charcount&&\ifnum\charcount<111 \global\advance\charcount1
    \repeat\cr
    \extra\noalign{\hrule}\extra\noalign{\global\advance\charcount1 }
    \it'16x&&
    \gloop\char\charcount&&\ifnum\charcount<119 \global\advance\charcount1
    \repeat\cr
    \extra\oddrule7\extra\noalign{\global\advance\charcount1 }
    \it'17x&&
    \gloop\char\charcount&&\ifnum\charcount<127 \global\advance\charcount1
    \repeat\cr
    \extra\noalign{\hrule}\extra\noalign{\global\advance\charcount1 }
    \omit&height12pt depth 4pt&
    \rm\char'175 \tt8&&\rm\char'175 \tt9&&\rm\char'175 \tt A&&
    \rm\char'175 \tt B&&\rm\char'175 \tt C&&\rm\char'175 \tt D&&
    \rm\char'175 \tt E&&\rm\char'175 \tt F&\cr}
  \endgroup}

\def\Printfont#1#2{\printfont{#1}%
  \nobreak\bigskip\nobreak
  \centerline{\TeX\ Font #1: #2}%
  \vfill\eject}

%>>> EOF printfont.txs <<<