%% 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 <<<
