summaryrefslogtreecommitdiff
path: root/imageto/strips.tex
blob: 1b7a3ee4984bd3bf2954174dbd6064a0d5c8e08e (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
% TeX file to display a ``font'' made from imagetofont's -strips option.

% Set up our font.
\message{Fontname? }
\read -1 to \testfontname
\font\testfont = \testfontname\space
\testfont

% \monthname produces the name of the month, abbreviated to three
% letters.  The primitive \month should never be zero.
% 
\def\monthname{%
   \ifcase\month
      \or Jan\or Feb\or Mar\or Apr\or May\or Jun%
      \or Jul\or Aug\or Sep\or Oct\or Nov\or Dec%
   \fi
}%

% \timestring produces the current time, in a format like `1:14 p.m.'.
% 
\def\timestring{\begingroup
   \count0 = \time
   \divide\count0 by 60
   \count2 = \count0   % The hour, from zero to 23.
   %
   \count4 = \time
   \multiply\count0 by 60
   \advance\count4 by -\count0   % The minute, from zero to 59.
   % But we need the minutes with a leading zero, if necessary.
   \ifnum\count4<10
      \toks1 = {0}%
   \else
      \toks1 = {}%
   \fi
   % 
   % Convert the hour into `a.m.' or `p.m.', and make it mod 12.
   \ifnum\count2<12
      \toks0 = {a.m.}%
   \else
      \toks0 = {p.m.}%
      \advance\count2 by -12
   \fi
   %
   % If it's midnight, call it `12', not `0'.
   \ifnum\count2=0
      \count2 = 12
   \fi
   %
   % Produce the output.
   \number\count2:\the\toks1 \number\count4 \thinspace \the\toks0
\endgroup}%
%
%
% \timestamp produces a text string for the whole thing like
% `23 Apr 1964  1:14 p.m.'.
%
\def\timestamp{\number\day\space\monthname\space\number\year\quad\timestring}%

\nopagenumbers
\headline = {\hfil \tt \testfontname \quad \timestamp}

% Use as much of the page as we dare.
\hoffset = -5pc  \hsize = 49pc
\voffset = -5pc  \vsize = 64pc

% Don't worry if there's no good place to break pages.
\vbadness = 10000

% No leading between ``lines''.
\offinterlineskip

% Don't worry if the font doesn't have exactly 256 characters, since
% roundoff error makes this likely.
\tracinglostchars = 0


\count255 = 0
\loop
  %\setbox0 = \hbox{\char\count255}
  \leftline{\char\count255}
  \advance\count255 by 1
  \ifnum\count255<256
\repeat

\end