%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Fonts                                                            Fonts
%
\expandafter\xdef\csname c@tcode\endcsname{\the\catcode`\@}
\catcode`\@=11
\newcount\t@mpa
%
%  \f@ntselect takes the \f@ntname and proceeds from there
%
\def\f@ntselect#1{\def\f@ntname{#1}\scanf@ntsizes\loadf@nt}
%
%  \scanf@ntsizes looks for the best \f@ntindex for \f@ntsize.
%
\def\scanf@ntsizes{\t@mpa=0\relax%
\loop\expandafter\ifnum\csname f@ntsize\the\t@mpa\endcsname<\f@ntsize%
\advance\t@mpa by 1\relax\repeat%
\edef\f@ntindex{\the\t@mpa}}
%
%  \loadf@nt switches to the font given by \f@ntname and \f@ntindex
%
\def\loadf@nt{%
\expandafter\ifx\csname \f@ntname\f@ntindex\endcsname\relax
% preceding test for "font already loaded?" does not work.
% following tests for "filename constructable?" work, but
% they don't test "fontfile really exists?"
\expandafter\ifx\csname f@ntname\f@ntindex\endcsname\relax\else
\expandafter\ifx\csname f@nt\f@ntname\endcsname\relax\else
\generatef@ntfile
\expandafter\font\csname \f@ntname\f@ntindex\endcsname=\f@ntfile\relax
\fi\fi\fi
\csname \f@ntname\f@ntindex\endcsname}
%
\def\generatef@ntfile{\edef\f@ntfile{\csname f@nt\f@ntname\endcsname%
\csname f@ntname\f@ntindex\endcsname}}
%
\def\it{\f@ntselect{it}}
\def\rm{\f@ntselect{rm}}
\def\sc{\f@ntselect{sc}}
\def\bf{\f@ntselect{bf}}
\def\sl{\f@ntselect{sl}}
\def\sf{\f@ntselect{sf}}
\def\tt{\f@ntselect{tt}}  % does not suppress hypenation.
\def\os{\f@ntselect{mi}}
%
%  Define \large, \Large, etc.
%
%  NB:  These should affect \baselineskip
%
\def\genericf@ntsize#1{\t@mpa=\b@seindex\advance\t@mpa by #1\relax
\ifnum\t@mpa<\f@ntsizeindex%\iw{Good}
\edef\f@ntindex{\the\t@mpa}%
\edef\f@ntsize{\csname f@ntsize\f@ntindex\endcsname}%
\loadf@nt\fi\fixstrut\ifhmode\unskip\fi\ignorespaces}  % ign is a kludge
%
\def\tiniest{\genericf@ntsize{-6}}
\def\tinier{\genericf@ntsize{-5}}
\def\tiny{\genericf@ntsize{-4}}
\def\smallest{\genericf@ntsize{-3}}
\def\smaller{\genericf@ntsize{-2}}
\def\small{\genericf@ntsize{-1}}
\def\normalsize{\genericf@ntsize0}
\def\large{\genericf@ntsize1}
\def\larger{\genericf@ntsize2}
\def\largest{\genericf@ntsize3}
\def\huge{\genericf@ntsize4}
\def\hugest{\genericf@ntsize5}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Computer Modern Roman is the default font family
%
\def\f@ntrm{cmr}
\def\f@ntit{cmti}
\def\f@ntsc{cmcsc}
\def\f@ntsl{cmsl}
\def\f@ntbf{cmbx}
\def\f@ntsf{cmss}
\def\f@nttt{cmtt}   % need to add math font support
%
\newcount\f@ntsizeindex\f@ntsizeindex=0
\def\f@ntsizedef#1#2{
\expandafter\def\csname f@ntsize\the\f@ntsizeindex\endcsname{#1}
\expandafter\def\csname f@ntname\the\f@ntsizeindex\endcsname{#2}
\advance\f@ntsizeindex by 1
}
%
\f@ntsizedef{50}{5}
\f@ntsizedef{60}{6}
\f@ntsizedef{70}{7}
\f@ntsizedef{80}{8}
\f@ntsizedef{90}{9}
\f@ntsizedef{100}{10}
\f@ntsizedef{110}{10 at 10.967pt}
\f@ntsizedef{120}{12}
\f@ntsizedef{144}{10 at 14.4pt}
%\f@ntsizedef{170}{17}
\f@ntsizedef{207}{10 at 20.733pt}
\f@ntsizedef{249}{10 at 24.867pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newdimen\str@th\newdimen\str@td
\def\fixstrut{\setbox\strutbox=\hbox{(}%
\str@th=\ht\strutbox \advance\str@th by 1pt
\str@td=\dp\strutbox \advance\str@td by 1pt
\setbox\strutbox=\hbox{\vrule height\str@th depth\str@td width0pt}
\baselineskip=\str@th \advance\baselineskip by \str@td \relax}
%
\def\pt#1{\def\f@ntsize{#1}\scanf@ntsizes\edef\b@seindex{\f@ntindex}}
%
\def\tenpoint{\pt{100}\rm}
\def\elevenpoint{\pt{110}\rm}
\def\twelvepoint{\pt{120}\rm}
\tenpoint                        % default is 10pt roman
%
\catcode`\@=\c@tcode
