%&tex

%% This is a part of the MAKOR system for typesetting Hebrew with
%% (La)TeX.

%\TeXXeTstate=1

\def\boxme#1{\vbox{\hrule height\Vthickness
        \hbox{\vrule width\Vthickness#1\vrule width\Vthickness}%
        \hrule height\Vthickness}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  Please adjust the following definition of \gridfont to apply
%%  to your current font of interest.  Leave an extra space within
%%  the definition (eg., \def\gridfont{oshomsehe })
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

                \def\gridfont{rashi }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  ALTER THIS DIMENSION AS YOU SEE FIT.  RECOMMENDED VALUES ARE
%%  500PT, 200PT, 100PT, ETC.   
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                \newdimen\gfontsize 
                \gfontsize=50pt 

\baselineskip=\gfontsize
\newdimen\vsizefudge \vsizefudge=3pc
\advance\voffset by-\vsizefudge \advance\vsize by2\vsizefudge
\font\gfont=\gridfont at\gfontsize
\setbox0=\hbox{\gfont l}\dimen0=\ht0
\setbox0=\hbox{\gfont k}\advance\dimen0 by\dp0
%\baselineskip=1.05\dimen0
\newdimen\vthickness \newdimen\hthickness
\vthickness=.3pt \hthickness=.6pt
\newdimen\Vthickness \Vthickness=.6pt
\newdimen\hinc \hinc=.02\gfontsize % horizontal increment
\newdimen\Hinc \Hinc=10\hinc
\newdimen\scrdim \newdimen\target
\newcount\scr \newcount\bundle \bundle=5
\def\gridhrule#1{\hrule width\dimen0 height#1 depth0pt}
\def\drawhgridrule{\llap{\vbox to0pt{\vss\gridhrule{\vthickness}}}}
\def\Drawhgridrule{\llap{\vbox to0pt{\vss\gridhrule{\Vthickness}}}}
\def\gridvrule#1{\vrule width#1 height\dimen2 depth\dimen4}
\def\drawgridvrule{\hbox to0pt{\hss\gridvrule{\vthickness}\hss}}
\def\Drawgridvrule{\hbox to0pt{\hss\gridvrule{\Vthickness}\hss}}
\def\DDrawgridvrule{\hbox to0pt{\hss\gridvrule{1.8\Vthickness}\hss}}
\def\gridletter#1{\hbox{\setbox0=\hbox{\gfont #1}%
        \dimen0=\wd0 \dimen2=\ht0
        \dimen4=\dp0 \target=.5\dimen0 \advance\target by-\vthickness
        \leavevmode\dimen8=\dp0 \advance\dimen8 by\Vthickness
        \lower\dimen8\boxme{\box0}\hskip-\Vthickness
        \scrdim=0pt \Drawhgridrule
        %% Do top...
        \loop \advance\scrdim by\Hinc \ifdim\scrdim <\dimen2 
        \raise\scrdim\Drawhgridrule \repeat
        %% Do bottom...
        \scrdim=0pt
        \loop \advance\scrdim by\Hinc \ifdim\scrdim <\dimen4 
        \lower\scrdim\Drawhgridrule \repeat
        \hskip -.5\dimen0 \DDrawgridvrule % go to middle
        % first do right half...
        \scrdim=0pt \scr=0
        \loop \ifnum\scr=0 \scr=\bundle \let\next=\Drawgridvrule
                \else \let\next=\drawgridvrule\fi \advance\scr by-1
                \next
                \advance\scrdim by\hinc \hskip\hinc
                \ifdim\scrdim<\target\repeat
        \hskip-\scrdim \hskip-\hinc
        \scr=\bundle \advance\scr by-1
        \loop \ifnum\scr=0 \scr=\bundle \let\next=\Drawgridvrule
                \else \let\next=\drawgridvrule\fi \advance\scr by-1
                \next % left half
                \advance\scrdim by-\hinc \hskip-\hinc
                \ifdim\scrdim>\hinc\repeat
        \hskip\dimen0\hskip2\Vthickness \hskip6pt}\hskip6pt
}
% Suppose \foo=12.0003pt.  The command \truncate\foo makes \foo=12pt.
\def\truncate#1{\dimen0=#1 \scr=\dimen0 \divide\scr by65536
        \dimen0=\scr pt \the\dimen0}

\tolerance=7000 \raggedright
\catcode`\^=12

\font\tinyrm=cmr8
{\baselineskip=9pt \tinyrm
\dimen0=\dp\strutbox \advance\dimen0 by.4pt
\centerline{\bf Font \lower\dimen0\boxme{\ \strut\gridfont\ }\ in Grid Format}\smallskip
The intervals between the vertical lines are \truncate\hinc\ apart; heavy
verticals occur every {\multiply\hinc by\bundle \truncate\hinc}.
Horizontal grid lines occur every \truncate\Hinc.
\scr=\gfontsize \dimen0=10pt \divide\scr by\dimen0
These characters have been rendered at a size of \the\gfontsize.  All
measurements should be scaled down by a factor of \the\scr\ to apply to 
fonts at a 10-pt design size.
\par}

\noindent%
\gridletter{\char65}\gridletter{\char66}\gridletter{\char67}%

\gridletter{\char68}

\gridletter{J}\gridletter{\char69}

\gridletter{\char70}\gridletter{\char71}\gridletter{\char72}\gridletter{\char73}\gridletter{\char74}\gridletter{\char75}\gridletter{\char76}\gridletter{\char77}\gridletter{\char182}

\gridletter{\char188}
\bye

\gridletter{\char181}\gridletter{\char198}

\gridletter{\char199}
\bye

\gridletter{H}\gridletter{I}\bye

%% \gridletter{O}\gridletter{`}\gridletter{b}\gridletter{g*}\gridletter{d*}%
%% \gridletter{h*}\gridletter{w*}\gridletter{z*}\gridletter{ch}\gridletter{t*}%
%% \gridletter{y*}\gridletter{k\noboundary}\gridletter{k}\gridletter{l*}%
%% \gridletter{m*\noboundary}\gridletter{m}\gridletter{n*\noboundary}%
%% \gridletter{n*}\gridletter{s*}\gridletter{``}\gridletter{p\noboundary}%
%% \gridletter{f}\gridletter{ts*\noboundary}\gridletter{ts}%
%% \gridletter{q*}\gridletter{r}\gridletter{sh*}\gridletter{t^}

\noindent\gridletter{a}\gridletter{e}\gridletter{\char60}\gridletter{+}\gridletter{'}%
\gridletter{u}\gridletter{i}\gridletter{:a}\gridletter{:e}\gridletter{:+}%
\gridletter{|}\gridletter{|a}\gridletter{|+}\gridletter{|e}%
\gridletter{|i}\gridletter{|"}

\bye


%%% Local Variables: 
%%% mode: plain-tex
%%% TeX-master: t
%%% End: 
