Debian Codegraph @

texmf-dist/source/fonts/bookhands/inslrmin.dtx

raw
1 % \iffalse meta-comment
2 %
3 % inslrmin.dtx
4 % Copyright 1999 Peter R. Wilson
5 %
6 % This program is provided under the terms of the
7 % LaTeX Project Public License distributed from CTAN
8 % archives in directory macros/latex/base/lppl.txt.
9 %
10 % Author: Peter Wilson (CUA) (now at: [email protected])
11 %
12 % If you do not have the docmfp package (available from CTAN in
13 % tex-archive/macros/latex/contrib/supported), comment out the
14 % \usepackage{docmfp} line below and uncomment the line following it.
15 %
16 %<*driver>
17 \documentclass{ltxdoc}
18 \usepackage{docmfp}
19 %%%%%% \providecommand{\DescribeVariable}[1]{} \newenvironment{routine}[1]{}{}
20 \EnableCrossrefs
21 \CodelineIndex
22 %% comment out next line to see the code
23 \OnlyDescription
24 \setcounter{StandardModuleDepth}{1}
25 \begin{document}
26 \DocInput{inslrmin.dtx}
27 \end{document}
28 %</driver>
29 %
30 % \fi
31 %
32 % \CheckSum{134}
33 %
34 % \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
35 % \DoNotIndex{\@centercr,\@cite}
36 % \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
37 % \DoNotIndex{\@input,\@ixpt,\@m}
38 % \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint}
39 % \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb}
40 % \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt}
41 % \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt}
42 % \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace}
43 % \DoNotIndex{\advance,\Alph,\alph}
44 % \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
45 % \DoNotIndex{\bullet}
46 % \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption}
47 % \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass}
48 % \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist}
49 % \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
50 % \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter}
51 % \DoNotIndex{\fbox}
52 % \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef}
53 % \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
54 % \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi}
55 % \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi}
56 % \DoNotIndex{\input}
57 % \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark}
58 % \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright}
59 % \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
60 % \DoNotIndex{\NeedsTeXFormat,\newdimen}
61 % \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number}
62 % \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@}
63 % \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip}
64 % \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
65 % \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
66 % \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font}
67 % \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman}
68 % \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength}
69 % \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space}
70 % \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase}
71 % \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt}
72 % \DoNotIndex{\viipt,\vipt,\vskip,\vspace}
73 % \DoNotIndex{\wd,\xiipt,\year,\z@}
74 %
75 % \changes{v1.0}{2002/12/30}{First public release}
76 %
77 % \def\fileversion{v1.0}
78 % \def\filedate{2002/12/30}
79 % \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
80 % \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
81 % \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
82 % \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter
83 % \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle
84 % \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment
85 % \newcommand*{\AD}{\textsc{ad}}
86 % \newcommand*{\thisfont}{Insular Minuscule}
87 %
88 % \title{The \Lpack{Insular Minuscule} fonts\thanks{This
89 % file has version number \fileversion, last revised
90 % \filedate.}}
91 %
92 % \author{%
93 % Peter Wilson\\
94 % Catholic University of America \\
95 % Now at \texttt{[email protected]}
96 % }
97 % \date{\filedate}
98 % \maketitle
99 % \begin{abstract}
100 % The \Lpack{inslrmin} and \Lpack{allimin} packages provide a set of
101 % Metafont \thisfont{} book-hands
102 % as used
103 % for manuscripts from the 6th century onwards. This is one in a series
104 % of manuscript fonts.
105 % \end{abstract}
106 % \tableofcontents
107 % \listoftables
108 %
109 %
110 %
111 %
112 % \section{Introduction}
113 %
114 % The \Lpack{inslrmin} and \Lpack{allimin} packages provide a Metafont~\cite{METAFONT} version
115 % of the \thisfont{} manuscript book-hand that was in use from the
116 % sixth century~\AD{} onwards. It is part of a project to provide fonts
117 % covering the major manuscript hands between the first century~\AD{} and
118 % the invention of printing. The principal resources used in this project
119 % are listed in the Bibliography.
120 %
121 % This manual is typeset according to the conventions of the
122 % \LaTeX{} \textsc{docstrip} utility which enables the automatic
123 % extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}.
124 % The \Lpack{docmfp} package is used for documenting the Metafont portions
125 % of the distribution~\cite{DOCMFP}.
126 %
127 % Section~\ref{sec:usc} describes the usage of the package.
128 % Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd}
129 % and source code for the package is in Section~\ref{sec:code}.
130 %
131 % \subsection{Manuscript book-hands}
132 %
133 % Before the invention of printing all books were written by hand. The book-hands
134 % used by the scribes and copyists for the manuscripts changed as time
135 % went on. Table~\ref{tab:1} lists some of the common book-hands which were used
136 % between the 1st and 15th centuries. The later book-hands formed the basis of the
137 % fonts used by the early printers, which in turn form the basis of the printing
138 % fonts in use today.
139 %
140 % The manuscript book-hands were written with a broad nibbed reed or quill
141 % pen. Among the distinguishing characteristics of a hand, apart from the
142 % actual shape of the letters, are the angle of the pen (which controls the
143 % variation between thick and thin strokes) and the height of a letter compared
144 % to the width of the nib. The lower the ratio of the letter height to nib
145 % width, the more condensed is the script. The scripts also varied in their
146 % typical height.
147 %
148 % Table~\ref{tab:1} gives an `average' x-height for each
149 % script, which I obtained by measuring a sample of photographs of
150 % manuscripts written in the various hands. About a dozen examples
151 % of each book-hand were measured. This figure should not be taken too
152 % seriously.
153 %
154 % There was not a sharp division between the use of one hand and another.
155 % Many manuscripts exhibit a variety of hands in the same document. For example,
156 % the scribe writing in an Uncial hand may have used Roman Rustic letters
157 % for capitals. Usually the same pen was used for the two different scripts.
158 %
159 % Generally speaking, as a hand got older it became more embelished, and
160 % therefore took longer to write. As this happened a new hand would appear that
161 % was faster, and which would eventually make the earlier one obsolete.
162 %
163 % Many of the book-hands were single-cased; that is, they did not have an
164 % upper- and lower-case as we do nowadays in Western scripts. On the other
165 % hand, a script might be majuscule or minuscule. A \textit{majuscule} script
166 % is one, like our upper-case, where the letters are drawn between two lines
167 % and are of a uniform height with no ascenders or descenders.
168 % A \textit{minuscule} script, like our lower-case, is drawn between four lines
169 % and has ascenders and descenders.
170 %
171 % \begin{table}
172 % \centering
173 % \caption{The main manuscript book-hands} \label{tab:1}
174 % \begin{tabular}{lccccc} \hline
175 % Name & Century & x-height & Height & Pen & Normalised \\
176 % & & (mm) & (nib widths) & angle & height \\ \hline
177 % Roman Rustic & 1--6 & 5.7 & 4--6 & 45 & 1.90 \\
178 % Uncial & 3--6 & 4.1 & 4--5 & 30 & 1.37 \\
179 % Half Uncial & 3--9 & 3.2 & 3--6 & 20--30 & 1.07 \\
180 % Artificial Uncial & 6--10 & 4.2 & 3--6 & 10 & 1.40 \\
181 % Insular majuscule & 6--9 & 4.2 & 5 & 0--20 & 1.40 \\
182 % Insular minuscule & 6 onward & 4.1 & 5--6 & 45--70 & 1.37 \\
183 % Carolingian minuscule & 8--12 & 3.0 & 3--5 & 45 & 1.00 \\
184 % Early Gothic & 11--12 & 3.8 & 4--6 & 20--45 & 1.27 \\
185 % Gothic Textura & 13--15 & 3.9 & 3--5 & 30--45 & 1.30 \\
186 % Gothic Prescius & 13 onward & 3.3 & 4--5 & 45 & 1.10 \\
187 % Rotunda & 13--15 & 3.2 & 4--6 & 30 & 1.07 \\
188 % Humanist minuscule & 14 onward & 3.0 & 4--5 & 30--40 & 1.00 \\ \hline
189 % \end{tabular}
190 % \end{table}
191 %
192 % During the period under consideration arabic numerals were effectively
193 % not used. At the beginning they were unknown and even though some knew
194 % of them towards the end, the glyphs used for them are not recognisable ---
195 % to me they look somewhat like cryllic letters --- and each locality
196 % and time had its own highly individualistic rendering. The general rule
197 % when using one of these book-hands is to write all numbers using
198 % roman numerals.
199 %
200 % The Roman alphabet consisted of 23 capital letters --- the J, U and W
201 % were absent. The book-hands initially used both a `u' and a `v' interchangeably
202 % but by the 10th century the practice had become to use the `v' before a vowel
203 % and the `u' otherwise. The letter corresponding to the W sound appeared
204 % in England around the 7th century in
205 % the form of the runic \textit{wen} character and by about the 11th century
206 % the `w' chacter was generally used. The `J' is the newest letter of all, not
207 % appearing until about the mid 16th century.
208 %
209 % In the first century punctuation was virtually unknown, and typically
210 % would not even be any additional space between individual words, never
211 % mind denoting ends of sentences. Sometimes a dot at mid-height would be
212 % used as a word seperator, or to mark off the end of a paragraph. Effectively
213 % a text was a continuous stream of letters. By the time that printing was
214 % invented, though, all of our modern punctuation marks were being used.
215 %
216 % Among all these manuscript hands, the Carolingian minuscule is the
217 % most important as our modern fonts are based on its letter shapes, and it is
218 % also at this point in time where the division occured between the black letter
219 % scripts as used even today in Germany, and the lighter fonts used elesewhere.
220 % The Rotunda and Humanist minuscule hands were developed in Italy and were
221 % essentially a rediscovery of the Carolingian minusucle. Guthenberg took the
222 % Gothic scripts as the model for his types. Later printers,
223 % such as Nicholas Jenson of Venice,
224 % took the Humanist scripts as their models.
225 %
226 %
227 % \subsection{The \thisfont{} script}
228 %
229 % The \thisfont{} hand has been in use from the sixth century.
230 % It was originally developed in Ireland by St.~Patrick's monks
231 % as a less formal and faster hand than the Insular majuscule,
232 % the most famous example of which is the \textit{Book of Kells}.
233 %
234 % Although the letter shapes in this book-hand are principally of
235 % a lower-case form, there are a few that are shaped like capital letters.
236 % For example, the `n' appeared as both an `n' and as an `N',
237 % while the `f' and `r' were written like `F' and `R'.
238 % Some letters had multiple forms. As well as the `n' the `r' could be written
239 % as either `r' or `R'.
240 %
241 % The letters were written very close together and the scibes used many
242 % adhoc ligatures. A favourite was using a long `e' before a letter
243 % with a bar at the x-height, and joining the crossbar of the `e' to
244 % the bar of the following letter, for instance the pair `eg'.
245 % I have only provided the ampersand, `\&', as a ligature, standing for
246 % `et' which is the Latin for `and'.
247 % Letters were also stretched if a line
248 % needed some filling. For example, the capital form of the `N' might be
249 % stretched to 2 or 3 times its normal width.
250 %
251 % Usually the
252 % lettering in a manuscript was all one size. If the scribe felt the need
253 % for `capital' letters then, using the same pen, would either write a larger
254 % \thisfont{} letter or a letter from one of the more formal book-hands.
255 % I have provided a set of `capital' letters that are only a little larger
256 % than the normal letters for use in running text.
257 % During the time the \thisfont{} script was used the alphabet only had 24
258 % letters. I have included the missing J.
259 %
260 % Arabic numerals were unknown at this time, so all numbers were written
261 % using the roman numbering system. I have provided \thisfont{} versions of
262 % the arabic digits.
263 %
264 % Punctuation was used, but not with the frequency of today.
265 % A sentence might be ended with
266 % a dot at mid-height or a paragraph ended with a colon, also at mid-height.
267 % The comma was was a small
268 % slash; the semi-colon was known, as was the single quotation
269 % mark which was represented by a raised comma.
270 %
271 %
272 % \section{The \Lpack{inslrmin} and \Lpack{allimin} packages} \label{sec:usc}
273 %
274 % The \thisfont{} font family is called |imin|. The font is supplied in both
275 % OT1 and T1 encodings.
276 %
277 % \subsection{The \Lpack{inslrmin} package}
278 %
279 % This is intended for the occasions when some short pieces of text have
280 % to be written in \thisfont{} while the majority of the document is in another
281 % font. The normal baselineskips are used.
282 %
283 % \DescribeMacro{\iminfamily}
284 % The |\iminfamily| declaration starts typesetting with the \thisfont{} fonts.
285 % Use of the \thisfont{} font will continue until either there is another |\...family|
286 % declaration or the current group (e.g., environment) is closed.
287 %
288 % \DescribeMacro{\textimin}
289 % The command |\textimin{|\meta{text}|}| will typeset \meta{text} using the
290 % \thisfont{} fonts.
291 %
292 % \subsection{The \Lpack{allimin} package}
293 %
294 %
295 % This package is for when the entire document will be typeset with the
296 % \thisfont{} font. The baselineskips are set to those appropriate to the
297 % book-hand.
298 %
299 % This is a minimalist package. Apart from declaring \thisfont{} to be the
300 % default font and setting the baselineskips appropriately, it makes no other
301 % alterations.
302 % Vertical spacing
303 % before and after section titles and before and after lists, etc., will be
304 % too small as the \LaTeX{} design assumes a font comparable in size to
305 % normal printing fonts, and the book-hand is much taller.
306 % To capture more of the flavour of the time, all numbers
307 % should be written using roman numerals.
308 % The \Lpack{romannum} package~\cite{ROMANNUM}
309 % can be used so that \LaTeX{} will typeset the numbers that it generates,
310 % like sectioning or caption numbers, using roman numerals instead of arabic
311 % digits.
312 %
313 % \DescribeMacro{\cmrfamily}
314 % \DescribeMacro{\textcmr}
315 % \DescribeMacro{\cmssfamily}
316 % \DescribeMacro{\textcmss}
317 % \DescribeMacro{\cmttfamily}
318 % \DescribeMacro{\textcmtt}
319 % The |...family| declarations start typesetting with the Computer Modern Roman
320 % (|\cmrfamily|), the Computer Modern Sans (|\cmssfamily|), and the Computer
321 % Modern Typewriter (|\cmttfamily|) font families. The |\textcm..{|\meta{text}|}|
322 % commands will typeset \meta{text} in the corresponding Computer Modern font.
323 %
324 % The \Lpack{allimin} package automatically loads the \Lpack{inslrmin} package,
325 % so its font commands are available if necessary.
326 %
327 % \StopEventually{
328 % \bibliographystyle{alpha}
329 % \renewcommand{\refname}{Bibliography}
330 % \begin{thebibliography}{GMS94}
331 % \addcontentsline{toc}{section}{\refname}
332 %
333 % \bibitem[And69]{ANDERSON69}
334 % Donald M.~Anderson.
335 % \newblock {\em The Art of Written Forms: The Theory and Practice of Calligraphy}.
336 % \newblock Holt, Rinehart and Winston, 1969.
337 %
338 % \bibitem[Bol95]{BOLOGNA95}
339 % Giulia Bologna.
340 % \newblock {\em Illuminated Manuscripts: The Book before Gutenberg}.
341 % \newblock Crescent Books, 1995.
342 %
343 % \bibitem[Day95]{DAY95}
344 % Lewis F.~Day.
345 % \newblock {\em Alphabets Old \& New}.
346 % \newblock (3rd edition originally published by B.~T.~Batsford, 1910)
347 % \newblock Senate, 1995.
348 %
349 % \bibitem[Dro80]{DROGIN80}
350 % Marc Drogin.
351 % \newblock {\em Medieval Calligraphy: Its History and Technique}.
352 % \newblock Allenheld, Osmun \& Co., 1980.
353 %
354 % \bibitem[Dru95]{DRUCKER95}
355 % Johanna Drucker.
356 % \newblock {\em The Alphabetic Labyrinth}.
357 % \newblock Thames \& Hudson, 1995.
358 %
359 % \bibitem[Fir93]{FIRMAGE93}
360 % Richard A.~Firmage.
361 % \newblock {\em The Alphabet Abecedarium}.
362 % \newblock David R~Goodine, 1993.
363 %
364 % \bibitem[Fli98]{LETTRINE}
365 % Daniel Flipo.
366 % \newblock {\em The LETTRINE package}.
367 % \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}).
368 % \newblock 1998.
369 %
370 % \bibitem[Har95]{HARRIS95}
371 % David Harris.
372 % \newblock {\em The Art of Calligraphy}.
373 % \newblock DK Publishing, 1995.
374 %
375 % \bibitem[Jen95]{BETON}
376 % Frank Jensen.
377 % \newblock {\em The BETON package}.
378 % \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}).
379 % \newblock 1995.
380 %
381 % \bibitem[Joh71]{JOHNSTON75}
382 % Edward Johnston (ed. Heather Child).
383 % \newblock {\em Formal Penship and Other Papers}.
384 % \newblock Penthalic, 1971.
385 %
386 % \bibitem[Knu87]{CM}
387 % Donald E.~Knuth.
388 % \newblock {\em Computer Modern Typefaces}.
389 % \newblock Addison-Wesley, 1987.
390 %
391 % \bibitem[Knu92]{METAFONT}
392 % Donald E.~Knuth.
393 % \newblock {\em The METAFONTbook}.
394 % \newblock Addison-Wesley, 1992.
395 %
396 % \bibitem[GMS94]{GOOSSENS94}
397 % Michel Goossens, Frank Mittelbach, and Alexander Samarin.
398 % \newblock {\em The LaTeX Companion}.
399 % \newblock Addison-Wesley Publishing Company, 1994.
400 %
401 % \bibitem[Tho75]{THOMAS75}
402 % Alan G.~Thomas.
403 % \newblock {\em Great Books and Book Collectors}.
404 % \newblock Weidenfield and Nichoson, 1975.
405 %
406 % \bibitem[Wil99]{DOCMFP}
407 % Peter R.~Wilson.
408 % \newblock {\em The DOCMFP Package}.
409 % \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}).
410 % \newblock 1999.
411 %
412 % \bibitem[Wil99b]{ROMANNUM}
413 % Peter R.~Wilson.
414 % \newblock {\em The ROMANNUM Package}.
415 % \newblock (Available from CTAN in \texttt{macros/latex/contrib/supported}).
416 % \newblock 1999.
417 %
418 % \end{thebibliography}
419 % }
420 %
421 % \section{The Metafont code} \label{sec:mf}
422 %
423 %
424 % As previously noted, this work is part of a larger project to provide
425 % fonts covering the main manuscript book-hands. As such, one of the
426 % aims is to produce a coordinated set of fonts, especially as multiple
427 % hands might be used in a single document.
428 %
429 % Noting that the hands tend to be somewhat larger than the typical 10pt
430 % size (where the x-height is approximately 1.5mm) used for modern books,
431 % I have also designed the fonts
432 % at a larger than normal size, then applied some non-linear factors when reducing
433 % them down to a 10pt size.
434 % Further, I have used the height of the Carolingian minuscule as a
435 % normalising factor when deciding on the absolute height of any particular
436 % script. The x-height of the Carolingian font is made equal to the
437 % x-height of the Computer Modern Roman (CMR) font.
438 %
439 % Modern fonts are effectively drawn. That is, the outline of the letter is
440 % drawn carefully and the center is filled with ink. This is shown to good
441 % effect in the Metafont code for the Computer Modern fonts~\cite{CM}.
442 % In contrast, the manuscript letters were inked by single pen strokes in
443 % a calligraphic manner. I have tried to repeat this calligraphic style
444 % in the Metafont code.
445 %
446 % As much as possible I have tried to use parameter values from the
447 % Computer Modern Roman (CMR) fonts in order to reduce possible
448 % infelicities if the CM and manuscript fonts are used together. However,
449 % few of the CMR parameters are applicable to the calligraphic style.
450 %
451 %
452 % \subsection{The parameter file}
453 %
454 % We deal with the parameter files first, and start by announcing
455 % what they are for. The \thisfont{} font comes in three sizes and also as a normal
456 % and a bold font.
457 % \begin{macrocode}
458 %<*base7|base10|base17|base7b|base10b|base17b>
459 %<base7>%%% IMIN7.MF Insular Minuscule at 7 point design size.
460 %<base10>%%% IMIN10.MF Insular Minuscule at 10 point design size.
461 %<base17>%%% IMIN17.MF Insular Minuscule at 17 point design size.
462 %<base7b>%%% IMINB7.MF Insular Minuscule Bold at 7 point design size.
463 %<base10b>%%% IMINB10.MF Insular Minuscule Bold at 10 point design size.
464 %<base17b>%%% IMINB17.MF Insular Minuscule Bold at 17 point design size.
465 %
466 % \end{macrocode}
467 % Parameters from CMR are used as much as possible. We also
468 % make sure that \Lpack{cmbase} is loaded as well as plain Metafont.
469 % \begin{macrocode}
470 if unknown cmbase: input cmbase fi
471
472 %<base7>font_identifier:="IMIN"; font_size 7pt#;
473 %<base10>font_identifier:="IMIN"; font_size 10pt#;
474 %<base17>font_identifier:="IMIN"; font_size 17.28pt#;
475 %<base7b>font_identifier:="IMINB"; font_size 7pt#;
476 %<base10b>font_identifier:="IMINB"; font_size 10pt#;
477 %<base17b>font_identifier:="IMINB"; font_size 17.28pt#;
478
479 % \end{macrocode}
480 %
481 % \DescribeVariable{jutstretch}
482 % The CMR scaling for lowercase serifs wrt 17pt size.
483 % \begin{macrocode}
484 %<base7|base7b> jutstretch:=1.19;
485 %<base10|base10b> jutstretch:=1.152;
486 %<base17|base17b> jutstretch:=1.0;
487 % \end{macrocode}
488 %
489 % \DescribeVariable{stemstretch}
490 % The CMR scaling for lowercase stem widths wrt 17pt size.
491 % \begin{macrocode}
492 %<base7|base7b> stemstretch:=1.50;
493 %<base10|base10b> stemstretch:=1.31;
494 %<base17|base17b> stemstretch:=1.0;
495 % \end{macrocode}
496 %
497 % \DescribeVariable{caprat}
498 % The scaling for `capitals' wrt `lowercase'. This is pretty much a guess
499 % (the ratio for CMR10 is 1.59).
500 % \begin{macrocode}
501 caprat:=1.5; % ratio of capital height to minuscule height
502 % \end{macrocode}
503 %
504 % \DescribeVariable{cap_jutstretch}
505 % The CMR scaling for uppercase serifs wrt 17pt size.
506 % \begin{macrocode}
507 %<base7|base7b> cap_jutstretch:=1.3;
508 %<base10|base10b> cap_jutstretch:=1.2;
509 %<base17|base17b> cap_jutstretch:=1.0;
510 % \end{macrocode}
511 %
512 % \DescribeVariable{cap_stemstretch}
513 % The CMR scaling for uppercase stem width wrt 17pt size.
514 % \begin{macrocode}
515 %<base7|base7b> cap_stemstretch:=1.45;
516 %<base10|base10b> cap_stemstretch:=1.31;
517 %<base17|base17b> cap_stemstretch:=1.0;
518 % \end{macrocode}
519 %
520 % \DescribeVariable{bfudge}
521 % Letter width scaling for bold font wrt normal font.
522 % \begin{macrocode}
523 %<base7|base10|base17> bfudge:=1.0;
524 %<base7b|base10b|base17b> bfudge:=1.2;
525 % \end{macrocode}
526 %
527 % \DescribeVariable{szfudge}
528 % Width scaling wrt 17pt letter width.
529 % \begin{macrocode}
530 %<base7|base7b> szfudge:=1.18;
531 %<base10|base10b> szfudge:=1.0;
532 %<base17|base17b> szfudge:=1.0;
533 % \end{macrocode}
534 %
535 % \DescribeVariable{hstretch}
536 % Horizontal stretching factor wrt 17pt size letter width.
537 % \begin{macrocode}
538 hstretch:=szfudge*bfudge;
539 % \end{macrocode}
540 %
541 % \DescribeVariable{carol_height}
542 % The x-height of the Carolingian minuscule font.
543 % \begin{macrocode}
544 %<base7|base7b> carol_height#:=108.5/36pt#;
545 %<base10|base10b> carol_height#:=155/36pt#;
546 %<base17|base17b> carol_height#:=268/36pt#;
547 % \end{macrocode}
548 %
549 % \DescribeVariable{vstretch}
550 % The height of this font wrt the Carolingian font.
551 % \begin{macrocode}
552 vstretch:=1.37;
553
554 % \end{macrocode}
555 %
556 % \DescribeVariable{x_height}
557 % The x-height of lower case letters. Scaled from the Carolingian font.
558 % \begin{macrocode}
559 x_height#:=vstretch*carol_height#;
560 % \end{macrocode}
561 %
562 % \DescribeVariable{u}
563 % The unit width. The CMR values are used.
564 % \begin{macrocode}
565 %<base7> u#:=15.5/36pt#;
566 %<base10> u#:=20/36pt#;
567 %<base17> u#:=32.5/36pt#;
568 %<base7b> u#:=17.9/36pt#;
569 %<base10b> u#:=23/36pt#;
570 %<base17b> u#:=37/36pt#;
571 % \end{macrocode}
572 %
573 % \DescribeVariable{width_adj}
574 % \DescribeVariable{serif_fit}
575 % \DescribeVariable{cap_serif_fit}
576 % \DescribeVariable{letter_fit}
577 % The majority of these parameters and values are constant.
578 % They are for fine adjustements of characters. The CM values are used.
579 % \begin{macrocode}
580 width_adj#:=0pt#; % width adjustment for certain characters
581 serif_fit#:=0pt#; % extra sidebar near lowercase serifs
582 %<base7|base7b> cap_serif_fit#:=3.5/36pt#; % extra sidebar near uppercase serifs
583 %<base10|base10b> cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs
584 %<base17|base17b> cap_serif_fit#:=8/36pt#; % extra sidebar near uppercase serifs
585 %<base7|base7b> letter_fit#:=0pt#; % extra space added to all sidebars
586 %<base10|base10b> letter_fit#:=0pt#; % extra space added to all sidebars
587 %<base17|base17b> letter_fit#:=-0.1pt#; % extra space added to all sidebars
588 % \end{macrocode}
589 %
590 % \DescribeVariable{sb}
591 % A length used for adjusting the side bearings of characters.
592 % \begin{macrocode}
593 %<base7|base7b> sb#:=1/2u#; % unit for side bearings
594 %<base10|base10b> sb#:=1/2u#; % unit for side bearings
595 %<base17|base17b> sb#:=1/2u#; % unit for side bearings
596
597 % \end{macrocode}
598 %
599 % \DescribeVariable{cap_height}
600 % The height of capital letters.
601 % \begin{macrocode}
602 %<base7|base7b> cap_height#:=172.2/36pt#; % height of caps
603 %<base10|base10b> cap_height#:=246/36pt#; % height of caps
604 %<base17|base17b> cap_height#:=425/36pt#; % height of caps
605 % \end{macrocode}
606 %
607 % \DescribeVariable{thickfudge}
608 % The reciprocal of the font height in nib widths. Normal font height
609 % is 6 nib widths and the bold font height is 5 nib widths.
610 % \begin{macrocode}
611 %<base7|base10|base17> thickfudge:=1/6;
612 %<base7b|base10b|base17b> thickfudge:=1/5;
613 % \end{macrocode}
614 %
615 % \DescribeVariable{thinfudge}
616 % The nib sharpness.
617 % \begin{macrocode}
618 thinfudge:=1/6;
619 % \end{macrocode}
620 %
621 % \DescribeVariable{thick}
622 % The maximum nib width.
623 % That is, the width of the thickest line that can be penned.
624 % \begin{macrocode}
625 thick#:=stemstretch*thickfudge*x_height#; % max pen breadth
626 % \end{macrocode}
627 %
628 % \DescribeVariable{thin}
629 % The nib thinness.
630 % That is, the width of the thinnest line that can be penned.
631 % \begin{macrocode}
632 thin#:=thinfudge*thick#;
633 % \end{macrocode}
634 %
635 % \DescribeVariable{pangle}
636 % The pen angle (in degrees).
637 % \begin{macrocode}
638 pangle:=45; % pen angle
639 % \end{macrocode}
640 %
641 % \DescribeVariable{ascratio}
642 % The height of lower case ascenders wrt |x_height|.
643 % \begin{macrocode}
644 ascratio:=6/4;
645 % \end{macrocode}
646 %
647 % \DescribeVariable{asc_height}
648 % The height of lower case ascenders.
649 % \begin{macrocode}
650 asc_height#:=ascratio*x_height#;
651 % \end{macrocode}
652 %
653 % \DescribeVariable{descratio}
654 % The depth of lower case descenders wrt |x_height|.
655 % \begin{macrocode}
656 descratio:=5/4;
657 % \end{macrocode}
658 %
659 % \DescribeVariable{desc_depth}
660 % The depth of lower case descenders.
661 % \begin{macrocode}
662 desc_depth#:=descratio*x_height#;
663 % \end{macrocode}
664 %
665 % \DescribeVariable{fig_height}
666 % The height of numerals. Make these midway between normal and capital
667 % letters.
668 % \begin{macrocode}
669 fig_height#:=(0.5[1,caprat])*x_height#;
670 % \end{macrocode}
671 %
672 % \DescribeVariable{fig_width}
673 % The width of numerals. All numerals are the same width (roughly, an `o').
674 % \begin{macrocode}
675 fig_width#:=hstretch*(x_height#);
676 % \end{macrocode}
677 %
678 % \DescribeVariable{body_height}
679 % The height of the tallest character.
680 % \begin{macrocode}
681 body_height#:=caprat*asc_height#;
682 % \end{macrocode}
683 %
684 % \DescribeVariable{body_depth}
685 % The depth of the lowest character.
686 % \begin{macrocode}
687 body_depth#:=caprat*desc_depth#;
688 % \end{macrocode}
689 %
690 % \DescribeVariable{half_height}
691 % Half the normal letter height.
692 % \begin{macrocode}
693 half_height#:=1/2x_height#; % half the height of x height letters
694
695 % \end{macrocode}
696 %
697 % \DescribeVariable{side}
698 % We might be using a square for the character design.
699 % \begin{macrocode}
700 side#:=x_height#;
701 % \end{macrocode}
702 %
703 % \DescribeVariable{rule_thickness}
704 % Thickness of rules (in math symbols). The CMR values are used.
705 % \begin{macrocode}
706 %<base7|base7b> rule_thickness#:=.34pt#;
707 %<base10|base10b> rule_thickness#:=.4pt#;
708 %<base17|base17b> rule_thickness#:=.6pt#;
709
710 % \end{macrocode}
711 %
712 % \DescribeVariable{jutfudge}
713 % Controls the protrusion of serifs.
714 % \begin{macrocode}
715 jutfudge:= 3/4;
716 %%%%jutfudge:= 1/2;
717 % \end{macrocode}
718 %
719 % \DescribeVariable{jut}
720 % The lowercase serif protrusion.
721 % \begin{macrocode}
722 jut#:=jutstretch*jutfudge*thick#;
723 % \end{macrocode}
724 %
725 % \DescribeVariable{srad}
726 % |srad| with |0 < srad < 1| controls the serif radius.
727 % \begin{macrocode}
728 srad:=0.8; % was 0.5
729 % \end{macrocode}
730 %
731 % \DescribeVariable{trijut}
732 % The lowercase triangular serif protrusion.
733 % \begin{macrocode}
734 trijut#:=0.75jutstretch*thick#;
735 % \end{macrocode}
736 %
737 % \DescribeVariable{clubjut}
738 % The fractional protusion of the club base.
739 % \begin{macrocode}
740 clubjut:=5/12;
741 % \end{macrocode}
742 %
743 % \DescribeVariable{o}
744 % Amount of overshoot for curves (as in an `o'). Use CMR values.
745 % \begin{macrocode}
746 %<base7|base7b> o#:=5/36pt#;
747 %<base10|base10b> o#:=8/36pt#;
748 %<base17|base17b> o#:=10/36pt#;
749
750 % \end{macrocode}
751 %
752 % \DescribeVariable{slant}
753 % |slant| is the amount the font slopes to the right.
754 % \begin{macrocode}
755 slant:=0; % tilt ratio $(\Delta x/\Delta y)$
756
757 % \end{macrocode}
758 %
759 % \DescribeVariable{monospace}
760 % We are generating a variable-width font.
761 % \begin{macrocode}
762 monospace:=false; % should all characters have the same width?
763
764 % \end{macrocode}
765 %
766 % \DescribeVariable{dot_size}
767 % The size of (punctuation) dots.
768 % \begin{macrocode}
769 dot_size#:=5thin#; % size of dots
770 % \end{macrocode}
771 %
772 % \DescribeVariable{comma_width}
773 % The horizontal width of a comma.
774 % \begin{macrocode}
775 comma_width#:=2.5dot_size#;
776
777 % \end{macrocode}
778 %
779 % Finally, call the driver file for the font.
780 % \begin{macrocode}
781 generate imintitle %% switch to the driver file
782
783 % \end{macrocode}
784 %
785 % The end of this code section.
786 % \begin{macrocode}
787 %</base7|base10|base17|base7b|base10b|base17b>
788 % \end{macrocode}
789 %
790 %
791 % \subsection{The driver file}
792 %
793 % The driver file sets up the font parameters and also contains
794 % the macros used in the definition of the characters.
795 %
796 % \begin{macrocode}
797 %<*mfd>
798 % This is IMINTITLE.MF for the Insular Minuscule font.
799 % This makes a short font.
800 % This file also contains special macros universally needed in the
801 % font but either not in the cmbase.mf file or modifications of these.
802 %
803 % \end{macrocode}
804 %
805 % \begin{routine}{makebox}
806 % This is a new version of the \Lpack{cmbase.mf} |makebox| macro.
807 % Essentially, as we are only generating a single case font, we don't
808 % need all the horizontals for the CMR characters.
809 %
810 % \begin{macrocode}
811 % A new version of cmbase.mf makebox macro
812 def makebox(text rule) =
813 for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth:
814 rule((l,y)t_,(r,y)t_); endfor % horizontals
815 for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals
816 for x=u*(1+floor(1/u)) step u until r-1:
817 rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals
818 if charic<>0:
819 rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction
820 enddef;
821
822 % \end{macrocode}
823 % \end{routine}
824 %
825 % \begin{routine}{proofpcbb}
826 % The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of the
827 % square, and at the bottom and top midpoints, where the point |zS| is at
828 % position |(xoff,yoff)| in the square.
829 % \begin{macrocode}
830
831 % A macro to delineate a letter's bounding square in proof mode.
832 % Point z$ is at (xoff,yoff) in the bounding square.
833 def proofpcbb(suffix $)(expr xoff, yoff) =
834 if proofing > 0:
835 x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner
836 z$br = (x$bl+side, y$bl); % BRHC
837 z$tr = (x$bl+side, y$bl+side); % TRHC
838 z$tl = (x$bl, y$bl+side); % TLHC
839 z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points
840 pair hc, vc;
841 hc = (2u,0); vc = (0,2u);
842 pickup pensquare scaled 2;
843 for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc:
844 draw s-hc--s+hc;
845 draw s-vc--s+vc;
846 endfor
847 fi
848 enddef;
849
850 % \end{macrocode}
851 % \end{routine}
852 %
853 %
854 %
855 % \begin{routine}{inslrmin_font_setup}
856 % This macro contains the set up for the \thisfont{} fonts.
857 % \begin{macrocode}
858
859 def inslrmin_font_setup= % contains special stuff for inslrmin fonts
860 define_pixels(side,half_height,carol_height,comma_width);
861 define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit,
862 cap_serif_fit,jut,cap_jut,trijut);
863 define_pixels(fig_width);
864 define_whole_pixels(letter_fit,sb);
865 define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height,
866 desc_depth,body_depth,fig_height);
867 define_corrected_pixels(o);
868 define_blacker_pixels(thick,thin);
869 let adjust_fit = normal_adjust_fit;
870 % \end{macrocode}
871 % \DescribeVariable{stylus}
872 % The pen for drawing the thinnest lines is |stylus|.
873 % \begin{macrocode}
874 pickup pencircle scaled thin;
875 stylus:=savepen;
876 % \end{macrocode}
877 % \DescribeVariable{thickstylus}
878 % The pen for drawing lines a bit thicker than the thinnest is |thickstylus|.
879 % \begin{macrocode}
880 pickup pencircle scaled (1.5thin);
881 thickstylus:=savepen;
882 % \end{macrocode}
883 % \DescribeVariable{quill}
884 % The normal calligraphic pen is |quill|.
885 % \begin{macrocode}
886 pickup pencircle xscaled thick yscaled thin rotated pangle;
887 quill:=savepen;
888 numeric pcshiftx#; % x value of LHS of box wrt origin of char box
889 define_pixels(pcshiftx);
890 numeric sqxside#; % x size of the square
891 numeric sqyside#; % y size of the square
892 define_pixels(sqxside,sqyside);
893
894 enddef; % end of inslrmin_font_setup
895
896 % \end{macrocode}
897 % \end{routine}
898 %
899 %
900 % \DescribeVariable{ductus}
901 % A boolean to control drawing the ductus (TRUE) or the full letter (FALSE).
902 % \begin{macrocode}
903 boolean ductus;
904 ductus:=false;
905 % \end{macrocode}
906 %
907 % \DescribeVariable{qhor}
908 % \DescribeVariable{qvert}
909 % The cosine and sine of the pen angle.
910 % \begin{macrocode}
911 numeric qhor, qvert;
912 qhor:=cosd(pangle); qvert:=sind(pangle);
913 % \end{macrocode}
914 %
915 % \DescribeVariable{pdir}
916 % The vector corresponding to the pen angle.
917 % \begin{macrocode}
918 pair pdir; pdir=dir(pangle);
919 % \end{macrocode}
920 %
921 % \DescribeVariable{ppdir}
922 % The vector that is perpendicular (anticlockwise) to the pen angle.
923 % \begin{macrocode}
924 pair ppdir; ppdir=dir(pangle+90);
925 % \end{macrocode}
926 %
927 % \begin{routine}{draw_serif}
928 % A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to
929 % draw a serif of extent |jut| at |z1| to the left of the line from |z2|
930 % to |z1|. The
931 % radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2|
932 % starts at the point |z1a|.
933 % \begin{macrocode}
934
935 def draw_serif(suffix $, $$)(expr fr)=
936 numeric beta, ajut, bjut;
937 % \end{macrocode}
938 % |fr| and |beta| control the serif radius.
939 % \begin{macrocode}
940 beta=1-fr;
941 ajut=fr*jut; bjut=beta*jut;
942 % \end{macrocode}
943 % The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif
944 % the leftmost (rightmost) point is
945 % |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the
946 % distance |ajut|, and the other points are calculated from this. If the stem
947 % is not vertical, then we have to rotate |$b| to match.
948 % \begin{macrocode}
949 pair vec[]; vec1=unitvector(z$$-z$);
950 vec2=ajut*vec1;
951 z$a=z$ shifted vec2;
952 z$b=z$a rotatedaround (z$,-90);
953 boolean top_serif;
954 if y$>y$$:
955 top_serif := true;
956 z$c=z$b shifted (-bjut*pdir);
957 else:
958 top_serif:=false;
959 z$c=z$b shifted (bjut*pdir);
960 fi
961 % \end{macrocode}
962 % Draw the parts, and finish off.
963 % \begin{macrocode}
964 if top_serif:
965 draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif
966 else:
967 draw z$c--z$b{-pdir}..{z$$-z$}z$a;
968 fi
969 labels($a,$b,$c);
970 enddef; % end of draw_serif
971
972 % \end{macrocode}
973 % \end{routine}
974 %
975 % \begin{routine}{draw_roundserif}
976 % The |draw_serif| routine can leave a bump at the end of the stem.
977 % The |draw_roundserif| routine, which takes the same arguments,
978 % is meant to eliminate the bump.
979 % \begin{macrocode}
980
981 def draw_roundserif(suffix $, $$)(expr fr)=
982 draw_serif($, $$, fr);
983 undraw z$--z$a;
984 enddef; % end of draw_roundserif
985
986 % \end{macrocode}
987 % \end{routine}
988 %
989 %
990 % \begin{routine}{draw_flatserif}
991 % A macro to draw a serif. |draw_serif(1,2,f)| uses the current pen to
992 % draw a serif of extent |jut| at |z1| to the left of the line from |z2|
993 % to |z1|. The
994 % radius is controlled by |f|, where $0<f<1$. The `stem' from |z1| to |z2|
995 % starts at the point |z1a|. This produces a serif like |draw_serif| except
996 % that one side of the seerif is flat.
997 % \begin{macrocode}
998
999 def draw_flatserif(suffix $, $$)(expr fr)=
1000 numeric beta, ajut, bjut;
1001 % \end{macrocode}
1002 % |fr| and |beta| control the serif radius.
1003 % \begin{macrocode}
1004 beta=1-fr;
1005 ajut=fr*jut; bjut=beta*jut;
1006 % \end{macrocode}
1007 % The points |$c|, |$b| and |$a| define the serif. For a top (bottom) serif
1008 % the leftmost (rightmost) point is
1009 % |$c| and |$a| is on the stem. |$a| is moved from |$| towards |$$| by the
1010 % distance |ajut|, and the other points are calculated from this. If the stem
1011 % is not vertical, then we have to rotate |$b| to match.
1012 % \begin{macrocode}
1013 pair vec[]; vec1=unitvector(z$$-z$);
1014 vec2=ajut*vec1;
1015 z$a=z$ shifted vec2;
1016 %%% z$b=z$a rotatedaround (z$,-90);
1017 boolean top_serif;
1018 if y$>y$$:
1019 top_serif := true;
1020 z$c=z$ shifted (-jut*pdir);
1021 else:
1022 top_serif:=false;
1023 z$c=z$ shifted (jut*pdir);
1024 fi
1025 z$b = fr[z$,z$c];
1026 % \end{macrocode}
1027 % Draw the parts, and finish off.
1028 % \begin{macrocode}
1029 draw z$a--z$;
1030 if top_serif:
1031 draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif
1032 else:
1033 draw z$c--z$b{-pdir}..{z$$-z$}z$a;
1034 fi
1035 labels($a,$b,$c);
1036 enddef; % end of draw_flatserif
1037
1038 % \end{macrocode}
1039 % \end{routine}
1040 %
1041 %
1042 %
1043 % \begin{routine}{draw_triserif}
1044 % A macro to draw a triangular top left serif.
1045 % |draw_triserif(1,tj)| draws a serif at |z1| with its leftmost x
1046 % value at |x1-tj|, where it is assumed that the
1047 % top point on the stem is at |z1| and the stem was drawn with |quill|.
1048 % \begin{macrocode}
1049
1050 def draw_triserif(suffix $)(expr tj)=
1051 pen oldpen; oldpen:=currentpen;
1052 pickup quill;
1053 x$ts1'=lft x$; y$ts1'=bot y$;
1054 pickup stylus;
1055 lft x$ts1=x$ts1'; bot y$ts1=y$ts1';
1056 x$ts2=x$ts1-tj; z$ts2=whatever[z$,z$ts1];
1057 x$ts3=x$ts1; y$ts3=y$ts2-tj;
1058 pickup stylus;
1059 %% filldraw z$ts1--z$ts2--z$ts3--cycle;
1060 filldraw z$--z$ts2--z$ts3--cycle;
1061 pickup oldpen;
1062 labels($ts1,$ts2,$ts3);
1063 enddef; % end of draw_triserif
1064
1065 % \end{macrocode}
1066 % \end{routine}
1067 %
1068 % \begin{routine}{draw_istem}
1069 % A macro to draw the shape of an i. |draw_istem(1,2,f)| draws a stem whose
1070 % top is at |z1| and bottom at |z2|. It draws with the current pen and the serifs
1071 % are of extent |jut|. There is a top left and bottom right serif.
1072 % The serif radius is controlled by |f|, with $0<f<1$.
1073 % \begin{macrocode}
1074
1075 def draw_istem(suffix $, $$)(expr fr)=
1076 draw_serif($, $$, fr); % top serif
1077 draw_serif($$, $, fr); % bottom serif
1078 draw z$a--z$$a; % the stem
1079 enddef; % end of draw_istem
1080
1081 % \end{macrocode}
1082 % \end{routine}
1083 %
1084 % \begin{routine}{draw_tstem}
1085 % A macro to draw the shape of the stem of a `t'. |draw_tstem(1,2,f)| draws a
1086 % stem whose
1087 % top is at |z1| and bottom at |z2| with a right serif at |z2|. The radius
1088 % is controlled by |f|, with $0 < f < 1$.
1089 % It draws with the current pen and the serif is of extent |jut|.
1090 % NOTE: for the IMIN font, just the stem is drawn --- no serif!
1091 % \begin{macrocode}
1092
1093 def draw_tstem(suffix $, $$)(expr fr)=
1094 %% draw_serif($$, $, fr); % the serif
1095 %% draw z$--z$$a; % the stem
1096 draw z$--z$$;
1097 enddef; % end of draw_tstem
1098
1099 % \end{macrocode}
1100 % \end{routine}
1101 %
1102 % \begin{routine}{draw_tlserif}
1103 % A macro to draw a top left serif. |draw_tlserif(1,2,f)| draws a serif on top
1104 % of a stem whose absolute
1105 % top is at |z1| and bottom at |z2|. It draws with the current pen and the serif
1106 % is of extent |jut|. It also draws the stem to the point |z2|. The serif
1107 % radius is controlled by |f|, with $0<f<1$.
1108 % \begin{macrocode}
1109
1110 def draw_tlserif(suffix $, $$)(expr fr)=
1111 draw_serif($, $$, fr); % the serif
1112 draw z$a--z$$; % the stem
1113 enddef; % end of draw_tlserif
1114
1115 % \end{macrocode}
1116 % \end{routine}
1117 %
1118 %
1119 % \begin{routine}{draw_flick}
1120 % A macro to draw a flick (like an eyebrow).
1121 % |draw_flick(1,rise,fall,fjut)| draws a stroke starting at |z1| rising up by
1122 % |rise| and falling down by |fall| wrt |z1|. The overall stroke distance is
1123 % |fjut| to the right of |z1|. It is drawn with the current pen.
1124 % \begin{macrocode}
1125
1126 def draw_flick(suffix $)(expr rise, fall, fjut)=
1127 % \end{macrocode}
1128 % The points |z$a| and |z$b|, together with |z$| make up three points on the
1129 % ductus.
1130 % \begin{macrocode}
1131 rt x$b = x1+fjut; top y$b=y$-fall;
1132 x$a=0.5[x$,x$b]; top y$a=y$+rise;
1133 % \end{macrocode}
1134 % Draw the part, and finish off.
1135 % \begin{macrocode}
1136 draw z$..z$a..z$b;
1137 labels($a,$b);
1138 enddef; % end of draw_flick
1139
1140 % \end{macrocode}
1141 % \end{routine}
1142 %
1143 %
1144 % \begin{routine}{draw_wave}
1145 % A macro to draw a (horizontal) stroke with a flick at each end
1146 % (down at the left and up at the right). |draw_wave(1,2,f)| uses the current
1147 % pen to draw from |z1wl| to |z1wr|, where |x1wl=x1|, |y1wl=y1-f|, and
1148 % |x1wr=x2|, |y1wr=y2+f|, with |z1| assumed to be at the left of |z2|.
1149 % \begin{macrocode}
1150
1151 def draw_wave(suffix $,$$)(expr f)=
1152 x$wl=x$; y$wl=y$-f;
1153 x$wr=x$$; y$wr=y$$+f;
1154 z$wc=0.5[z$wl,z$wr];
1155 draw z$wl{pdir}..z$wc{right}..{pdir}z$wr;
1156 labels($wl,$wc,$wr);
1157 enddef; % end of draw_wave
1158 % \end{macrocode}
1159 % \end{routine}
1160 %
1161 % \begin{routine}{draw_tail}
1162 % A macro to draw a tail at the bottom of a (vertical) stem.
1163 % |draw_tail(1,fjut)| draws a tail at the bottom of the stem which ends at |z1|.
1164 % The depth is controlled by the |desc_depth| value and the jut by |fjut|.
1165 % \begin{macrocode}
1166
1167 def draw_tail(suffix $)(expr fj)=
1168 pen oldpen; oldpen:=currentpen;
1169 pickup quill;
1170 x$tl' = lft x$; y$tl=bot y$;
1171 pickup stylus;
1172 lft x$tl=x$tl';
1173 x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth;
1174 filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle;
1175 pickup oldpen;
1176 labels($tb,$tl);
1177 enddef; % end of draw_tail
1178 % \end{macrocode}
1179 % \end{routine}
1180 %
1181 % \begin{routine}{draw_triangle}
1182 % A macro to draw a downward pointing equilateral triangle.
1183 % |draw_triangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle
1184 % of the base.
1185 % \begin{macrocode}
1186
1187 def draw_triangle(suffix $)(expr sz)=
1188 pen oldpen; oldpen:=currentpen;
1189 pickup stylus;
1190 x$t1=x$-sz/2; x$t3=x$+sz/2;
1191 y$t1=y$t3=y$;
1192 x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2
1193 filldraw z$t1--z$t2--z$t3--cycle;
1194 pickup oldpen;
1195 labels($t1,$t2,$t3);
1196 enddef; % end of draw_triangle
1197 % \end{macrocode}
1198 % \end{routine}
1199 %
1200 % \begin{routine}{draw_utriangle}
1201 % A macro to draw an upward pointing equilateral triangle.
1202 % |draw_utriangle(1,sz)| draws a triangle of side length |sz| with |z1| in the middle
1203 % of the base.
1204 % \begin{macrocode}
1205
1206 def draw_utriangle(suffix $)(expr sz)=
1207 pen oldpen; oldpen:=currentpen;
1208 pickup stylus;
1209 x$t1=x$-sz/2; x$t3=x$+sz/2;
1210 y$t1=y$t3=y$;
1211 x$t2=x$; y$t2=y$+0.9sz; % approx sqrt(3)/2
1212 filldraw z$t1--z$t2--z$t3--cycle;
1213 pickup oldpen;
1214 labels($t1,$t2,$t3);
1215 enddef; % end of draw_utriangle
1216 % \end{macrocode}
1217 % \end{routine}
1218 %
1219 % \begin{routine}{draw_rtriangle}
1220 % A macro to draw a downward pointing right angled triangle.
1221 % |draw_rtriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the
1222 % right (where the right angle is).
1223 % \begin{macrocode}
1224
1225 def draw_rtriangle(suffix $)(expr sz)=
1226 pen oldpen; oldpen:=currentpen;
1227 pickup stylus;
1228 x$t1=x$-sz; rt x$t3=x$;
1229 y$t1=y$t3=y$;
1230 x$t2=x$t3; y$t2=y$-sz;
1231 filldraw z$t1--z$t2--z$t3--cycle;
1232 pickup oldpen;
1233 labels($t1,$t2,$t3);
1234 enddef; % end of draw_rtriangle
1235 % \end{macrocode}
1236 % \end{routine}
1237 %
1238 % \begin{routine}{draw_rutriangle}
1239 % A macro to draw an upward pointing right angled triangle.
1240 % |draw_rutriangle(1,sz)| draws a triangle of side length |sz| with |z1| at the
1241 % right (where the right angle is).
1242 % \begin{macrocode}
1243
1244 def draw_rutriangle(suffix $)(expr sz)=
1245 pen oldpen; oldpen:=currentpen;
1246 pickup stylus;
1247 x$t1=x$-sz; rt x$t3=x$;
1248 y$t1=y$t3=y$;
1249 x$t2=x$t3; y$t2=y$+sz;
1250 filldraw z$t1--z$t2--z$t3--cycle;
1251 pickup oldpen;
1252 labels($t1,$t2,$t3);
1253 enddef; % end of draw_rutriangle
1254 % \end{macrocode}
1255 % \end{routine}
1256 %
1257 % \begin{routine}{draw_fork}
1258 % A macro to draw a forked line.
1259 % |draw_fork(1,2,sz)| draws a graduated line from |z1| to |z2| with a forked
1260 % end of size |sz|.
1261 % \begin{macrocode}
1262
1263 def draw_fork(suffix $, $$)(expr sz)=
1264 pen oldpen; oldpen:=currentpen;
1265 pickup quill;
1266 x$f1'=lft x$; y$f1'=bot y$;
1267 x$f3'=rt x$; y$f3'=top y$;
1268 pickup stylus;
1269 lft x$f1=x$f1'; bot y$f1=y$f1';
1270 rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1);
1271 rt x$f2=x$$-sz; bot y$f2=y$$;
1272 rt x$f4= rt x$f5=x$$;
1273 bot y$f5=y$$-sz; top y$f4=y$$+1/2sz;
1274 filldraw z$f1--z$f2--z$f3--cycle; % the line
1275 draw z$f2{right}..z$f4; % upper fork
1276 draw z$f2{right}..z$f5; % lower fork
1277 pickup oldpen;
1278 labels($f1,$f2,$f3,$f4,$f5);
1279 enddef; % end of draw_fork
1280 % \end{macrocode}
1281 % \end{routine}
1282 %
1283 % \begin{routine}{draw_urswish}
1284 % A macro to draw a line up and to the right with an under curl at the end.
1285 % |draw_urswish(1,2)| draws from |z1| towards |z2|, which is the max upper right
1286 % of a bounding box, where the curl is.
1287 % \begin{macrocode}
1288
1289 def draw_urswish(suffix $, $$)=
1290 pen oldpen; oldpen:=currentpen;
1291 pickup quill;
1292 rt x$$s1=x$$-thick; top y$$s1=y$$;
1293 rt x$$s2=x$$;
1294 %% x$$s3=x$$-thick;
1295 lft x$$s3=x$$s1;
1296 bot y$$s3=y$$-thick; y$$s2=0.5[y$$s1,y$$s3];
1297 %% draw z$---z$$s1{right}..z$$s2{down}..{-pdir}z$$s3;
1298 draw z$..z$$s1{pdir}..z$$s2{down};
1299 labels($$s1,$$s2,$$s3);
1300 enddef; % end of draw_urswish
1301 % \end{macrocode}
1302 % \end{routine}
1303 %
1304 % \begin{routine}{bowl_stem}
1305 % Calculate where a bowl should meet a stem so that the pen is moving in the
1306 % pen direction.
1307 % |bowl_stem(1,2)| calculates the point |z1i|, where |z1| is on the bowl and
1308 % there is a vertical line at |x2|.
1309 %
1310 % \begin{macrocode}
1311
1312 def bowl_stem(suffix $, $$)=
1313 x$'=0.5[x$,x$$]; y$'=y$; % the mid-point
1314 z$''=z$' shifted (thick*pdir);
1315 x$i=x$$; z$i=whatever[z$',z$''];
1316 labels($',$i);
1317 enddef; % end of bowl_stem
1318 % \end{macrocode}
1319 % \end{routine}
1320 %
1321 % \begin{routine}{draw_clubbase}
1322 % Draw a clubbed bottom of a vertical stem for the IMIN font.
1323 % |draw_clubbase(1, 2, st, left, right)| draws from |st[z2,z1]| to |z2|.
1324 % At |z2| the pen
1325 % is shifted |left| fraction of the pen width and |right| fraction of the
1326 % pen width, both in the direction of the pen angle. Pen draws smoothly the
1327 % path |z1|, |left|, |right|, |z1|.
1328 % \begin{macrocode}
1329
1330 % draw clubbed bottom of vertical stem for IMIN font.
1331 def draw_clubbase(suffix $, $$)(expr st, lft, rt)=
1332 z$$l = z$$ shifted (lft*thick*(-pdir));
1333 z$$r = z$$ shifted (rt*thick*(pdir));
1334 z$$t = st[z$$,z$];
1335 draw z$$t{z$$-z$}..z$$l--z$$r..{z$-z$$}z$$t;
1336 labels($$t,$$l,$$r);
1337 enddef; % end of draw_clubbase
1338
1339 % \end{macrocode}
1340 % \end{routine}
1341 %
1342 % \begin{routine}{draw_pdot}
1343 % A macro to draw a period dot.
1344 % |draw_pdot(1,sz)| uses |stylus| to draw a dot centered at |z1| of overall size |sz|.
1345 % \begin{macrocode}
1346
1347 def draw_pdot(suffix $)(expr sz)=
1348 % \end{macrocode}
1349 % Draw a square rotated 45 degrees.
1350 % \begin{macrocode}
1351 z$s = z$ shifted (0.5sz*left);
1352 z$t = z$ shifted (0.5sz*up);
1353 z$u = z$s shifted (sz*right);
1354 z$v = z$t shifted (sz*down);
1355 pickup stylus;
1356 filldraw z$s--z$t--z$u--z$v--cycle;
1357 labels($s,$t,$u,$v);
1358 enddef; % end of draw_pdot
1359
1360 % \end{macrocode}
1361 % \end{routine}
1362 %
1363 % \begin{routine}{draw_pcomma}
1364 % A macro to draw a period comma.
1365 % |draw_pcomma(1,t,w)| draws a comma placed at |z1| (the top), line width is |t|
1366 % and bottom of line is |w| horizontally from |z1|. The pen is |stylus|.
1367 % \begin{macrocode}
1368
1369 def draw_pcomma(suffix $)(expr sz, ar)=
1370 % \end{macrocode}
1371 % Draw a line of at |z$| of width |sz| sloping back and down at 45 degrees
1372 % for a total width of |ar|.
1373 % \begin{macrocode}
1374 z$s = z$ shifted (0.5sz*left);
1375 z$t = z$s shifted (sz*right);
1376 x$v=x$s-ar; y$v=y$s-ar;
1377 z$u = z$v shifted (sz*right);
1378 pickup stylus;
1379 filldraw z$s--z$t--z$u--z$v--cycle;
1380 %% filldraw z$s--z$t--z$u--cycle;
1381 labels($s,$t,$u,$v);
1382 enddef; % end of draw_pcomma
1383
1384 % \end{macrocode}
1385 % \end{routine}
1386 %
1387 % \begin{routine}{draw_plq}
1388 % A macro to draw a period left quote.
1389 % |draw_pcomma(1,t,w)| draws a left quote placed at |z1| (the top), line width is |t|
1390 % and bottom of line is |w| horizontally from |z1|.
1391 % \begin{macrocode}
1392
1393 def draw_plq(suffix $)(expr sz, ar)=
1394 % \end{macrocode}
1395 % Draw a line of at |z$| of width |sz| sloping forward and down at 45 degrees
1396 % for a total width of |ar|.
1397 % \begin{macrocode}
1398 z$s = z$ shifted (0.5sz*left);
1399 z$t = z$s shifted (sz*right);
1400 x$v=x$s+ar; y$v=y$s-ar;
1401 z$u = z$v shifted (sz*right);
1402 pickup stylus;
1403 filldraw z$s--z$t--z$u--z$v--cycle;
1404 %% filldraw z$s--z$t--z$v--cycle;
1405 labels($s,$t,$u,$v);
1406 enddef; % end of draw_plq
1407
1408 % \end{macrocode}
1409 % \end{routine}
1410 %
1411 % \begin{routine}{offsetbowl}
1412 % A macro to calculate the outer and inner paths (|obouter| and |obinner|)
1413 % for a non-centered letter `o'. |offsetbowl($, sx, sy, fx, fy)|
1414 % calculates the paths for an `o'
1415 % enclosed in a rectangle size |sx| by |sy| with its bottom lefthand corner
1416 % located at |z$|, where the center of the o is at |(fx*sx, fy*sy)| in the
1417 % bounding rectangle.
1418 %
1419 % Two construction paths, namely |obfirst| and |obsecond| are also
1420 % available. They should be identical.
1421 %
1422 % All paths have points listed in a clockwise direction, starting with
1423 % |z$nh| or |z$minl| as appropriate.
1424 %
1425 % |offsetbowl($, sx, sy, 1/2, 1/2)| gives the same results as |obowl($, sx, sy)|.
1426 % \begin{macrocode}
1427
1428 path obouter, obinner, obfirst, obsecond;
1429 def offsetbowl(suffix $)(expr sx, sy, fx, fy)=
1430 numeric inx, iny, cx, cy;
1431 pair pt[];
1432 path pth[];
1433 inx := 1/2thick*cosd(pangle); iny := 1/2thick*sind(pangle);
1434 cx := x$+fx*sx; cy := y$+fy*sy;
1435 z$obc = (cx,cy);
1436 % \end{macrocode}
1437 % Calulate points on the centre path of the pen. These are offset by |inx|
1438 % from the rectangles vertical sides and by |iny| from the horizontal sides.
1439 % If the pen is parallel to a side, offset the point by half the pen's
1440 % dimension. First do the West, East, North and South points.
1441 % \begin{macrocode}
1442 if pangle = 90:
1443 z$wt=(x$+1/2thin, cy);
1444 z$et=(x$+sx-1/2thin, cy);
1445 else:
1446 z$wt=(x$+inx, cy);
1447 z$et=(x$+sx-inx, cy);
1448 penpos$wt(thick,pangle);
1449 penpos$et(thick,pangle);
1450 fi
1451 if pangle = 0:
1452 z$nh=(cx, y$+sy-1/2thin);
1453 z$sh=(cx, y$+1/2thin);
1454 else:
1455 z$nh=(cx, y$+sy-iny);
1456 z$sh=(cx, y$+iny);
1457 penpos$nh(thick,pangle);
1458 penpos$sh(thick,pangle);
1459 fi
1460 obfirst := z$nh{right}..z$et{down}..z$sh{left}..z$wt{up}..cycle;
1461 % \end{macrocode}
1462 % Now calculate the points on the path |obfirst| where the pen will
1463 % draw the min width lines (i.e., the points where the pen will be
1464 % moving parallel to |pangle|).
1465 % \begin{macrocode}
1466 if pangle = 90:
1467 z$minl = z$wt; z$maxr = z$nh; z$minr = z$et; z$maxl = z$sh;
1468 else:
1469 if pangle = 0:
1470 z$minl = z$nh; z$maxr = z$et; z$minr = z$sh; z$maxl = z$wt;
1471 else:
1472 z$minl = directionpoint dir(pangle) of obfirst;
1473 z$minr = directionpoint -dir(pangle) of obfirst;
1474 % \end{macrocode}
1475 % The max points are roughly where the inner and outer diverge
1476 % the most. These are simple for 0 and 90 degree pens and have
1477 % been calculated above. It's not so simple for intermediate
1478 % angles. For a reasonable looking result, we pick the max
1479 % points to be halfway between the min points. This involves
1480 % calculating some angles, paths and intersections.
1481 % \begin{macrocode}
1482 pt1 := z$minr - z$minl; % direction
1483 pt2 := (- ypart pt1, xpart pt1); % perpendicular
1484 pt3 := 1/2[z$minl, z$minr];
1485 pt4 := pt3 shifted pt2;
1486 pt5 := pt3 shifted -pt2;
1487 pth1 := pt3--pt4;
1488 pth2 := pt3--pt5;
1489 z$maxr = pth1 intersectionpoint obfirst;
1490 z$maxl = pth2 intersectionpoint obfirst;
1491 \fi
1492 \fi
1493 % \end{macrocode}
1494 % Place the pen at each of these points to get the outer and inner points.
1495 % \begin{macrocode}
1496 penpos$minl(thin,pangle+90);
1497 penpos$maxr(thick,pangle);
1498 penpos$minr(thin,pangle+90);
1499 penpos$maxl(thick,pangle);
1500 % \end{macrocode}
1501 % Finally, the outer and inner paths.
1502 % \begin{macrocode}
1503 obsecond := z$minl..z$maxr..z$minr..z$maxl..cycle;
1504 z$minlo = z$minl.r; z$maxro = z$maxr.r;
1505 z$minro = z$minr.l; z$maxlo = z$maxl.l;
1506 obouter := z$minlo{dir(pangle)}...z$maxro...z$minro{-dir(pangle)}...z$maxlo...cycle;
1507 z$minli = z$minl.l; z$maxri = z$maxr.l;
1508 z$minri = z$minr.r; z$maxli = z$maxl.r;
1509 obinner := z$minli...z$maxri...z$minri...z$maxli...cycle;
1510 labels($obc, $nh, $et, $sh, $wt);
1511 labels($minl, $maxr, $minr, $maxl);
1512 labels($minlo, $maxro, $minro, $maxlo);
1513 labels($minli, $maxri, $minri, $maxli);
1514 enddef;
1515
1516 % \end{macrocode}
1517 % \end{routine}
1518 %
1519 % \begin{routine}{obowl}
1520 % A macro to calculate the outer and inner paths (|obouter| and |obinner|)
1521 % for the letter `o'. |obowl($, sx, sy)| calculates the paths for an `o'
1522 % centered and enclosed in a rectangle size |sx| by |sy| with its bottom
1523 % lefthand corner located at |z$|.
1524 % \begin{macrocode}
1525
1526 def obowl(suffix $)(expr sx, sy)=
1527 offsetbowl($, sx, sy, 1/2, 1/2);
1528 enddef;
1529
1530 % \end{macrocode}
1531 % \end{routine}
1532 %
1533 % \begin{routine}{scalarprod}
1534 % |v scalarprod w| calulates the scalar product between the
1535 % two vectors |v| and |w|.
1536 % \begin{macrocode}
1537
1538 primarydef v scalarprod w =
1539 (xpart v * ypart w - ypart v * xpart w)
1540 enddef;
1541
1542 % \end{macrocode}
1543 % \end{routine}
1544 %
1545 % \begin{routine}{tangentpoint}
1546 % |tangentpoint($, path)| calculates the point |z$tan| on the |path|
1547 % so that |z$tan--z$| is tangent to the path. It uses a binary search
1548 % to find a point on the path such that the path direction is
1549 % (anti-) parallel to the dirction from that point to the given point.
1550 % \begin{macrocode}
1551
1552 def tangentpoint(suffix $)(expr pth)=
1553 pair vecll, veclr, veclm; % "tangent" line directions
1554 numeric pl, pr, pm; % path parameter values
1555 pair vecpl, vecpr, vecpm; % path directions
1556 pair ptl, ptr, ptm; % path points
1557 numeric sl, sr, sm; % scalar products of path/line directions
1558 numeric stpsize; % size of current binary step
1559 numeric tantol; % tolerance
1560 boolean wtest; % a boolean
1561
1562 tantol := eps;
1563 % \end{macrocode}
1564 % Initialise using the left right and middle points on the path.
1565 % \begin{macrocode}
1566 pl:=0; pr:=length pth; pm:=0.5(pl+pr); stpsize:=pr-pl;
1567 ptl := point pl of pth;
1568 ptm := point pm of pth;
1569 ptr := point pr of pth;
1570 % \end{macrocode}
1571 % Now the various vectors, and make sure they are unit vectors to
1572 % have a consistent measure scale when we take the scalar products.
1573 % \begin{macrocode}
1574 vecll := unitvector (z$-ptl);
1575 veclm := unitvector (z$-ptm);
1576 veclr := unitvector (z$-ptr);
1577 vecpl := unitvector (direction pl of pth);
1578 vecpm := unitvector (direction pm of pth);
1579 vecpr := unitvector (direction pr of pth);
1580 sl := vecll scalarprod vecpl;
1581 sm := veclm scalarprod vecpm;
1582 sr := veclr scalarprod vecpr;
1583 % \end{macrocode}
1584 % We stop if any of the points is the tangent point, or if the step
1585 % size is too small, or if the signs of the left and right scalar
1586 % products are the same.
1587 % \begin{macrocode}
1588 wtest := (stpsize < tantol) or (sl*sr > 0) or
1589 (abs sl < tantol) or (abs sm < tantol) or (abs sr < tantol);
1590 if wtest:
1591 if (stpsize < tantol):
1592 z$tan=(0,0);
1593 errmessage("No tangent; path too short");
1594 else:
1595 if (sl*sr > 0):
1596 z$tan=(0,0);
1597 errmessage("No tangent; end products have the same sign");
1598 else:
1599 if (abs sl < tantol):
1600 z$tan=ptl;
1601 else:
1602 if (abs sm < tantol):
1603 z$tan=ptm;
1604 else:
1605 z$tan=ptr;
1606 fi
1607 fi
1608 fi
1609 fi
1610 else:
1611 % \end{macrocode}
1612 % There should be a tangent and we iterate to find it, using
1613 % bisection. If there is one to be found it will be at the
1614 % current middle point. The tangent point will be somewhere
1615 % between the two points that lead to opposite signed scalar
1616 % products.
1617 % \begin{macrocode}
1618 forever:
1619 if (sl*sm < 0): % opposite signs, look between pl & pm
1620 pr:=pm; pm:=0.5(pr+pl);
1621 vecpr := vecpm; veclr := veclm; sr:=sm;
1622 else:
1623 pl:=pm; pm:=0.5(pr+pl);
1624 vecpl:=vecpm; vecll:=veclm; sl:=sm;
1625 fi
1626 stpsize:=pr-pl;
1627 ptm := point pm of pth;
1628 veclm := unitvector (z$-ptm);
1629 vecpm := unitvector (direction pm of pth);
1630 sm := veclm scalarprod vecpm;
1631 % \end{macrocode}
1632 % We stop the iteration if the step size is too small or the
1633 % middle point is the tangent point. In either case, the
1634 % middle point is the best guess that can be made.
1635 % \begin{macrocode}
1636 wtest := (stpsize < tantol) or (abs sm < tantol);
1637 if wtest:
1638 if (abs sm < tantol):
1639 z$tan = ptm;
1640 else:
1641 z$tan = ptm;
1642 %%%%%% errmessage("Warning: tangent approximated");
1643 fi
1644 fi
1645 exitif wtest;
1646 endfor
1647 fi
1648 enddef;
1649
1650 % \end{macrocode}
1651 % \end{routine}
1652 %
1653 %
1654 % Set the mode and font setup.
1655 % \begin{macrocode}
1656
1657 font_coding_scheme:="ASCII minuscules and punctuation";
1658 mode_setup;
1659 inslrmin_font_setup;
1660
1661 % \end{macrocode}
1662 %
1663 %
1664 % We generate letters, together with some punctuation and
1665 % analphabetics.
1666 % \begin{macrocode}
1667
1668 input iminl; % lower case
1669 input iminu; % capitals
1670 input iminpunct; % punctuation
1671 input iminlig; % the several dashes
1672 input imindig; % arabic digits
1673
1674 % \end{macrocode}
1675 %
1676 % Set up the spacings, stretches and shrinks.
1677 %
1678 % \begin{macrocode}
1679
1680 font_slant slant; font_x_height x_height#;
1681 if monospace:
1682 font_normal_space vstretch*9u#; % no stretching or shrinking
1683 font_quad vstretch*18u#;
1684 font_extra_space vstretch*9u#;
1685 else:
1686 font_normal_space vstretch*6u#+2letter_fit#;
1687 font_normal_stretch vstretch*3u#; font_normal_shrink vstretch*2u#;
1688 font_quad vstretch*18u#+4letter_fit#;
1689 font_extra_space vstretch*2u#;
1690
1691 % \end{macrocode}
1692 %
1693 % Finally, do the ligtables, but I don't think they are needed (yet?).
1694 %
1695 % \begin{macrocode}
1696 fi
1697
1698 bye.
1699
1700 % \end{macrocode}
1701 %
1702 % \begin{macrocode}
1703 k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning
1704 kks#:=-4u#; kkx#:=-1.5u#; kkj#:=-2u#; kkr#:=-5u#; kkrs#:=-2u#; kkrl#:=-8u#;
1705 ligtable "s":
1706 "a" kern kks#, "A" kern kks#,
1707 "c" kern kks#, "C" kern kks#,
1708 "d" kern kks#, "D" kern kks#,
1709 "e" kern kks#, "E" kern kks#,
1710 "f" kern kks#, "F" kern kks#,
1711 "g" kern kks#, "G" kern kks#,
1712 "i" kern kks#, "I" kern kks#,
1713 "j" kern kks#, "J" kern kks#,
1714 "k" kern kks#, "K" kern kks#,
1715 "m" kern kks#, "M" kern kks#,
1716 "n" kern kks#, "N" kern kks#,
1717 "o" kern kks#, "O" kern kks#,
1718 "p" kern kks#, "P" kern kks#,
1719 "q" kern kks#, "Q" kern kks#,
1720 "r" kern kks#, "R" kern kks#,
1721 "t" kern kks#, "T" kern kks#,
1722 "u" kern kks#, "U" kern kks#,
1723 "v" kern kks#, "V" kern kks#,
1724 "w" kern kks#, "W" kern kks#,
1725 "x" kern kks#, "X" kern kks#,
1726 "y" kern kks#, "Y" kern kks#,
1727 "z" kern kks#, "Z" kern kks#;
1728
1729 ligtable "S":
1730 "a" kern kks#, "A" kern kks#,
1731 "c" kern kks#, "C" kern kks#,
1732 "d" kern kks#, "D" kern kks#,
1733 "e" kern kks#, "E" kern kks#,
1734 "f" kern kks#, "F" kern kks#,
1735 "g" kern kks#, "G" kern kks#,
1736 "i" kern kks#, "I" kern kks#,
1737 "j" kern kks#, "J" kern kks#,
1738 "k" kern kks#, "K" kern kks#,
1739 "m" kern kks#, "M" kern kks#,
1740 "n" kern kks#, "N" kern kks#,
1741 "o" kern kks#, "O" kern kks#,
1742 "p" kern kks#, "P" kern kks#,
1743 "q" kern kks#, "Q" kern kks#,
1744 "r" kern kks#, "R" kern kks#,
1745 "t" kern kks#, "T" kern kks#,
1746 "u" kern kks#, "U" kern kks#,
1747 "v" kern kks#, "V" kern kks#,
1748 "w" kern kks#, "W" kern kks#,
1749 "x" kern kks#, "X" kern kks#,
1750 "y" kern kks#, "Y" kern kks#,
1751 "z" kern kks#, "Z" kern kks#;
1752
1753 ligtable "x":
1754 "a" kern kkx#, "A" kern kkx#,
1755 "b" kern kkx#, "B" kern kkx#,
1756 "c" kern kkx#, "C" kern kkx#,
1757 "d" kern kkx#, "D" kern kkx#,
1758 "e" kern kkx#, "E" kern kkx#,
1759 "g" kern kkx#, "G" kern kkx#,
1760 "j" kern kkx#, "J" kern kkx#,
1761 "l" kern kkx#, "L" kern kkx#,
1762 "o" kern kkx#, "O" kern kkx#,
1763 "q" kern kkx#, "Q" kern kkx#,
1764 "t" kern kkx#, "T" kern kkx#,
1765 "u" kern kkx#, "U" kern kkx#,
1766 "v" kern kkx#, "V" kern kkx#,
1767 "w" kern kkx#, "W" kern kkx#,
1768 "y" kern kkx#, "Y" kern kkx#;
1769
1770 ligtable "X":
1771 "a" kern kkx#, "A" kern kkx#,
1772 "b" kern kkx#, "B" kern kkx#,
1773 "c" kern kkx#, "C" kern kkx#,
1774 "d" kern kkx#, "D" kern kkx#,
1775 "e" kern kkx#, "E" kern kkx#,
1776 "g" kern kkx#, "G" kern kkx#,
1777 "j" kern kkx#, "J" kern kkx#,
1778 "l" kern kkx#, "L" kern kkx#,
1779 "o" kern kkx#, "O" kern kkx#,
1780 "q" kern kkx#, "Q" kern kkx#,
1781 "t" kern kkx#, "T" kern kkx#,
1782 "u" kern kkx#, "U" kern kkx#,
1783 "v" kern kkx#, "V" kern kkx#,
1784 "w" kern kkx#, "W" kern kkx#,
1785 "y" kern kkx#, "Y" kern kkx#;
1786
1787 ligtable "a": "A":
1788 "b": "B":
1789 "c": "C":
1790 "d": "D":
1791 "e": "E":
1792 "h": "H":
1793 "i": "I":
1794 "k": "K":
1795 "l": "L":
1796 "m": "M":
1797 "n": "N":
1798 "o": "O":
1799 "p": "P":
1800 "t": "T":
1801 "u": "U":
1802 "v": "V":
1803 "w": "W":
1804 "z": "Z":
1805 "j" kern kkj#, "J" kern kkj#;
1806
1807 ligtable "r":
1808 "a" kern kkr#, "A" kern kkr#,
1809 "b" kern kkr#, "B" kern kkr#,
1810 "c" kern kkr#, "C" kern kkr#,
1811 "d" kern kkr#, "D" kern kkr#,
1812 "e" kern kkr#, "E" kern kkr#,
1813 "f" kern kkrs#, "F" kern kkrs#,
1814 "g" kern kkrs#, "G" kern kkrs#,
1815 "h" kern kkr#, "H" kern kkr#,
1816 "i" kern kkr#, "I" kern kkr#,
1817 "j" kern kkj#, "J" kern kkj#,
1818 "k" kern kkrs#, "K" kern kkrs#,
1819 "l" kern kkr#, "L" kern kkr#,
1820 "m" kern kkr#, "M" kern kkr#,
1821 "n" kern kkrs#, "N" kern kkrs#,
1822 "o" kern kkr#, "O" kern kkr#,
1823 "p" kern kkrs#, "P" kern kkrs#,
1824 "q" kern kkr#, "Q" kern kkr#,
1825 "r" kern kkrs#, "R" kern kkrs#,
1826 "s" kern kkr#, "S" kern kkr#,
1827 "t" kern kkr#, "T" kern kkr#,
1828 "u" kern kkr#, "U" kern kkr#,
1829 "v" kern kkr#, "V" kern kkr#,
1830 "w" kern kkr#, "W" kern kkr#,
1831 "x" kern kkx#, "X" kern kkx#,
1832 "y" kern kkr#, "Y" kern kkr#,
1833 "z" kern kkr#, "Z" kern kkr#;
1834
1835 ligtable "R":
1836 "a" kern kkr#, "A" kern kkr#,
1837 "b" kern kkr#, "B" kern kkr#,
1838 "c" kern kkr#, "C" kern kkr#,
1839 "d" kern kkr#, "D" kern kkr#,
1840 "e" kern kkr#, "E" kern kkr#,
1841 "f" kern kkrs#, "F" kern kkrs#,
1842 "g" kern kkrs#, "G" kern kkrs#,
1843 "h" kern kkr#, "H" kern kkr#,
1844 "i" kern kkr#, "I" kern kkr#,
1845 "j" kern kkj#, "J" kern kkj#,
1846 "k" kern kkrs#, "K" kern kkrs#,
1847 "l" kern kkr#, "L" kern kkr#,
1848 "m" kern kkr#, "M" kern kkr#,
1849 "n" kern kkrs#, "N" kern kkrs#,
1850 "o" kern kkr#, "O" kern kkr#,
1851 "p" kern kkrs#, "P" kern kkrs#,
1852 "q" kern kkr#, "Q" kern kkr#,
1853 "r" kern kkrs#, "R" kern kkrs#,
1854 "s" kern kkr#, "S" kern kkr#,
1855 "t" kern kkr#, "T" kern kkr#,
1856 "u" kern kkr#, "U" kern kkr#,
1857 "v" kern kkr#, "V" kern kkr#,
1858 "w" kern kkr#, "W" kern kkr#,
1859 "x" kern kkx#, "X" kern kkx#,
1860 "y" kern kkr#, "Y" kern kkr#,
1861 "z" kern kkr#, "Z" kern kkr#;
1862
1863
1864 fi
1865
1866 bye.
1867
1868 %</mfd>
1869 % \end{macrocode}
1870 %
1871 % \subsection{The code for normal letters}
1872 %
1873 % The following code is for the lower case characters.
1874 %
1875 % \begin{macrocode}
1876 %<*min>
1877 % IMINL.MF Program file for Insular Minuscule lower case
1878 %
1879
1880 % \end{macrocode}
1881 %
1882 %
1883 % \begin{routine}{a}
1884 % The letter `a'.
1885 % \begin{macrocode}
1886 cmchar "IMIN letter a";
1887 beginchar("a", 2sb#+hstretch*(3/4x_height#+jut#),
1888 x_height#, 0);
1889 adjust_fit(0,0);
1890 pcshiftx := sb;
1891 numeric n[];
1892 path pth[];
1893 pair pr[];
1894 pickup quill;
1895 n1 := w - 2pcshiftx -jut; % effective letter width
1896 % "stem"
1897 x1 = pcshiftx + 2/3n1; top y1=h;
1898 rt x2 = pcshiftx + n1; bot y2=0;
1899 z16 = 1/6[z2,z1];
1900 rt x6 = x16; y6=y16;
1901 lft x4 = pcshiftx; y4 = 1/2h;
1902 % stem path
1903 pth1 := z1{down}..z2;
1904 pr1 := direction 1 of pth1;
1905 z20 = z2 shifted -10pr1;
1906 %%ductus:=true;
1907 if ductus:
1908 pickup stylus;
1909 else:
1910 % draw stem
1911 draw pth1;
1912 draw_roundserif(2,20,srad);
1913 % draw bowl
1914 draw z1{-pdir}..z4{down}..z6{pdir};
1915 fi
1916 ductus:=false;
1917 penlabels(1,2,3,4,5,6,7,8,100);
1918 endchar; % end "a"
1919
1920 % \end{macrocode}
1921 % \end{routine}
1922 %
1923 % \begin{routine}{b}
1924 % The letter `b'.
1925 % \begin{macrocode}
1926 cmchar "IMIN letter b";
1927 beginchar("b", 2sb#+hstretch*(3/4x_height#),
1928 asc_height#, 0);
1929 adjust_fit(0,0);
1930 numeric n[];
1931 path pth[];
1932 pcshiftx := sb;
1933 pickup quill;
1934 n1:=w-2pcshiftx; % actual letter width
1935 n2:=h/ascratio; % top of bowl
1936 %%ductus:=true;
1937 lft x1 = pcshiftx+jut; top y1=h;
1938 lft x3 = pcshiftx; y3=1/2n2;
1939 rt x5 = w-pcshiftx; y5=y3;
1940 x4 = 1/2[x3,x5]; bot y4=0;
1941 x6=x4; top y6=n2;
1942 pth1 := z1..z3{down}..z4{right}.. z5{up};
1943 z98=(0,3/4n2); z99=(w,y98);
1944 pth2 := z98--z99;
1945 z7 = pth1 intersectionpoint pth2;
1946 if ductus:
1947 pickup stylus;
1948 fi
1949 draw z1..z3{down}..z4{right}..z5{up}..z6{left}..z7{-pdir};
1950 draw_flatserif(1,7,srad);
1951 ductus:=false;
1952 penlabels(1,2,3,4,5,6,7,8,9,100);
1953 endchar; % end "b"
1954
1955 % \end{macrocode}
1956 % \end{routine}
1957 %
1958 %
1959 % \begin{routine}{c}
1960 % The letter `c'.
1961 % \begin{macrocode}
1962 cmchar "IMIN letter c";
1963 beginchar("c", 2sb#+hstretch*(5/8x_height#),
1964 x_height#, 0);
1965 adjust_fit(0,0);
1966 numeric n[];
1967 pcshiftx := sb;
1968 pickup quill;
1969 n1:=w-2pcshiftx; % actual letter width
1970 n2:=6/5w-2pcshiftx; % width of full bowl
1971 x1=pcshiftx + 1/2n1; top y1 = h;
1972 lft x2 = pcshiftx; y2 = 1/2h;
1973 x3 = x1; bot y3 = 0;
1974 rt x4 = w-pcshiftx; y4 = 1/4h;
1975 x24 = x4; y24 = 3/4h;
1976 %%ductus:=true;
1977 if ductus:
1978 pickup stylus;
1979 fi
1980 draw z24..z1{left}..z2{down}..z3{right}..z4{pdir};
1981 ductus:=false;
1982 penlabels(1,2,3,4,5,6,14,16,17,18,100);
1983 endchar; % end "c"
1984
1985 % \end{macrocode}
1986 % \end{routine}
1987 %
1988 % \begin{routine}{d}
1989 % The letter `d'. There is a choice between a curved and straight stem.
1990 % I have done the straight one.
1991 % \begin{macrocode}
1992 cmchar "IMIN letter d";
1993 beginchar("d", 2sb#+hstretch*(3/4x_height#),
1994 asc_height#, 0);
1995 adjust_fit(0,0);
1996 numeric n[];
1997 path pth[];
1998 pcshiftx := sb;
1999 pickup quill;
2000 lft x1=pcshiftx; top y1=h;
2001 rt x3 = w-pcshiftx; y3 = 1/2h/ascratio;
2002 x4 = 1/2[x1,x3]; bot y4 = 0;
2003 z5=(x1,y3);
2004 z98=(0,h/ascratio); z99=(w,y98); pth2 := z98--z99;
2005 pth1 := z1{-ppdir}..z3{down}..z4{left};
2006 z6 = pth1 intersectionpoint pth2;
2007 if ductus:
2008 pickup stylus;
2009 fi
2010 draw z1{-ppdir}..z3{down}..z4{left}..z5{up}..z6{pdir};
2011 ductus:=false;
2012 penlabels(0,1,2,3,4,5,6,7,8,100);
2013 endchar; % end "d"
2014
2015 % \end{macrocode}
2016 % \end{routine}
2017 %
2018 % \begin{routine}{e}
2019 % The letter `e'.
2020 % \begin{macrocode}
2021 cmchar "IMIN letter e";
2022 beginchar("e", sb#+hstretch*(5/4x_height#),
2023 x_height#, 0);
2024 adjust_fit(0,0);
2025 pcshiftx := sb;
2026 numeric n[];
2027 path pth[];
2028 pickup quill;
2029 n1 := w-pcshiftx; % actual letter width
2030 n2 := 4/8n1; % width of bowl
2031 x1 = pcshiftx + 5/8n2; top y1=h;
2032 lft x2 = pcshiftx; y2 = 1/2h;
2033 x3 = pcshiftx + 1/2n2; bot y3 = 0;
2034 rt x4 = pcshiftx + n2; y4 = 1/4h;
2035 z98=(0,3/8h); z99=(w,y98);
2036 pth1 := z98--z99;
2037 pth2 := z1{left}..z2{down}..z3{right};
2038 z7 = pth1 intersectionpoint pth2;
2039 rt x9 = w-pcshiftx; y9 = 3/4h;
2040 z8=1/2[z7,z9];
2041 %%ductus:=true;
2042 if ductus:
2043 pickup stylus;
2044 fi
2045 draw z7{pdir}..z1{left}..z2{down}..z3{right}..z4{pdir};
2046 draw z7{pdir}..z8{right}..z9{pdir};
2047 ductus:=false;
2048 penlabels(1,2,3,4,5,6,7,8,9,100);
2049 endchar; % end "e"
2050
2051 % \end{macrocode}
2052 % \end{routine}
2053 %
2054 % \begin{routine}{f}
2055 % The letter `f'.
2056 % \begin{macrocode}
2057 cmchar "IMIN letter f";
2058 beginchar("f", 2sb#+hstretch*(3/4x_height#+jut#),
2059 (x_height#), desc_depth#);
2060 adjust_fit(0,0);
2061 pcshiftx := sb;
2062 pickup quill;
2063 %% stem
2064 lft x1=lft x2=pcshiftx+jut;
2065 top y1=h; y2=-1/2d;
2066 lft x20=0; bot y20=-d;
2067 %% bottom bar
2068 z4=(rt x1,-thin); rt x6=w-pcshiftx; y6=y4+2thin; z5=1/2[z4,z6];
2069 %% top bar
2070 x7= x1; bot y7 = 1/2h;
2071 rt x9= w-pcshiftx; y9 = 1/2[y7,y1];
2072 x8 = 2/3[x7,x9]; top y8 = h;
2073 %%ductus:=true;
2074 if ductus:
2075 pickup stylus;
2076 fi
2077 draw_tstem(1,2,srad); % stem
2078 draw z2{down}..z20{-pdir};
2079 draw_flatserif(1,2,srad);
2080 draw z4{dir(45)}..z5{right}..z6{dir(45)}; % bottom bar
2081 %%draw_flick(7, 2thin, thin, (w-pcshiftx-x7+1/2thick)); % top bar
2082 draw z7..z8..z9; % top bar
2083 ductus:=false;
2084 penlabels(1,2,3,4,5,6,7,100);
2085 endchar; % end "f"
2086
2087 % \end{macrocode}
2088 % \end{routine}
2089 %
2090 % \begin{routine}{g}
2091 % The letter `g'.
2092 % \begin{macrocode}
2093 cmchar "IMIN letter g";
2094 beginchar("g", 2sb#+hstretch*(x_height#),
2095 x_height#, desc_depth#);
2096 adjust_fit(0,0);
2097 path pth[];
2098 pair vec[];
2099 pcshiftx := sb;
2100 pickup quill;
2101 %% top bar
2102 lft x1=pcshiftx; top y1=h; rt x2=w-pcshiftx; top y2=h;
2103 x3=1/2[x1,x2]; bot y3=1/8h;
2104 rt x5 = w-pcshiftx; y5 = -1/2d;
2105 x6 = x3; bot y6 = -d;
2106 x7 = 1/2[x1,x3]; y7 = y5;
2107 x8=x3; y8 = -y3;
2108 %%ductus:=true;
2109 if ductus:
2110 pickup stylus;
2111 draw z1--z2; % top bar
2112 draw pth1; draw pth2; % curves
2113 draw rt z8--z9; % diagonal
2114 else:
2115 draw z1--z2;
2116 draw z2--z3;
2117 draw z3{pdir}..z5{down}..z6{left}..z7{up}..z8{pdir};
2118 draw_roundserif(1,2,srad);
2119 fi
2120 ductus:=false;
2121 penlabels(1,2,3,4,5,6,7,8,9,100);
2122 endchar; % end "g"
2123
2124 % \end{macrocode}
2125 % \end{routine}
2126 %
2127 % \begin{routine}{h}
2128 % The letter `h'.
2129 % \begin{macrocode}
2130 cmchar "IMIN letter h";
2131 beginchar("h", 2sb#+hstretch*(7/8x_height#+jut#),
2132 asc_height#, 0);
2133 adjust_fit(0,0);
2134 pcshiftx := sb;
2135 pickup quill;
2136 numeric n[];
2137 %% stem
2138 lft x1=lft x2=pcshiftx+jut;
2139 top y1=h; bot y2=0;
2140 %% bowl
2141 z3=1/2[z2,z1];
2142 rt x5 = w-pcshiftx; y5=y3;
2143 x4=1/2[x3,x5]; top y4 = h/ascratio;
2144 lft x6=x4; bot y6=0;
2145 %%ductus:=true;
2146 if ductus:
2147 pickup stylus;
2148 fi
2149 draw_tstem(1,2,srad); % stem
2150 draw_flatserif(1,2,srad);
2151 draw_roundserif(2,1,srad);
2152 draw z3{pdir}..z4..z5..z6{-pdir};
2153
2154 ductus:=false;
2155 penlabels(1,2,3,4,5,6,100);
2156 endchar; % end "h"
2157
2158 % \end{macrocode}
2159 % \end{routine}
2160 %
2161 % \begin{routine}{i}
2162 % The letter `i'.
2163 % \begin{macrocode}
2164 cmchar "IMIN letter i";
2165 beginchar("i", 2sb#+hstretch*(thick#+2jut#),
2166 x_height#, 0);
2167 adjust_fit(0,0);
2168 pcshiftx := sb;
2169 pickup quill;
2170 lft x1=lft x2=pcshiftx+jut;
2171 top y1=h; bot y2=0;
2172 %%ductus:=true;
2173 draw_tstem(1,2,srad);
2174 draw_flatserif(1,2,srad);
2175 draw_roundserif(2,1,srad);
2176 ductus:=false;
2177 penlabels(1,2,100);
2178 endchar; % end "i"
2179
2180 % \end{macrocode}
2181 % \end{routine}
2182 %
2183 % \begin{routine}{j}
2184 % The letter `j'. This letter was not in the script, it being a later invention.
2185 % \begin{macrocode}
2186 cmchar "IMIN letter j";
2187 beginchar("j", sb#+hstretch*(3/8x_height#),
2188 x_height#, desc_depth#);
2189 adjust_fit(0,0);
2190 pcshiftx := sb;
2191 numeric n[];
2192 pickup quill;
2193 %% stem
2194 rt x1 = w-pcshiftx; top y1 = h;
2195 x2=x1; y2=-1/2d;
2196 %% bottom hook
2197 lft x3 = 0; bot y3 = -d;
2198 %%ductus:=true;
2199 if ductus:
2200 pickup stylus;
2201 fi
2202 draw z1--z2; % stem
2203 draw_flatserif(1,2,srad);
2204 draw z2{down}..z3{-pdir}; % hook
2205 ductus:=false;
2206 penlabels(1,2,3,100);
2207 endchar; % end "j"
2208
2209 % \end{macrocode}
2210 % \end{routine}
2211 %
2212 % \begin{routine}{k}
2213 % The letter `k'.
2214 % \begin{macrocode}
2215 cmchar "IMIN letter k";
2216 beginchar("k", 2sb#+hstretch*(x_height#+jut#),
2217 asc_height#, desc_depth#);
2218 adjust_fit(0,0);
2219 pcshiftx := sb;
2220 pickup quill;
2221 %% stem
2222 lft x1=lft x2=pcshiftx+jut;
2223 top y1=h; y2=-1/2d;
2224 lft x20=pcshiftx; bot y20=-d;
2225 %% top arm
2226 z3=(x1,1/2h/ascratio);
2227 rt x5=w-pcshiftx; y5=1/2[y3,y4];
2228 x4=1/2[x3,x5]; top y4=h/ascratio;
2229 %% lower arm
2230 x7=x5; bot y7=0;
2231 %%ductus:=true;
2232 if ductus:
2233 pickup stylus;
2234 fi
2235 draw_tstem(1,2,srad); % stem
2236 draw z2{down}..z20{-pdir};
2237 draw_flatserif(1,2,srad);
2238 draw z3..z4{right}..z5; % upper arm
2239 draw z3..{right}z7; % lower arm
2240 ductus:=false;
2241 penlabels(1,2,3,4,5,100);
2242 endchar; % end "k"
2243
2244 % \end{macrocode}
2245 % \end{routine}
2246 %
2247 % \begin{routine}{l}
2248 % The letter `l'.
2249 % \begin{macrocode}
2250 cmchar "IMIN letter l";
2251 beginchar("l", 2sb#+hstretch*(3/4x_height#),
2252 asc_height#, 0);
2253 adjust_fit(0,0);
2254 pcshiftx := sb;
2255 pickup quill;
2256 lft x2=pcshiftx; y2=1/5h;
2257 x1=x2+jut; top y1=h;
2258 rt x4=w-pcshiftx; y4=1/5h;
2259 x3=1/2[x2,x4]; bot y3=0;
2260 %%ductus:=true;
2261 if ductus:
2262 pickup stylus;
2263 fi
2264 draw z1{down}..z2..z3{right}..z4;
2265 draw_flatserif(1,2,srad);
2266 ductus:=false;
2267 penlabels(1,2,3,4,100);
2268 endchar; % end "l"
2269
2270 % \end{macrocode}
2271 % \end{routine}
2272 %
2273 % \begin{routine}{m}
2274 % The letter `m'.
2275 % \begin{macrocode}
2276 cmchar "IMIN letter m";
2277 beginchar("m", 2sb#+hstretch*(x_height#+2jut#),
2278 x_height#, 0);
2279 adjust_fit(0,0);
2280 pcshiftx := sb;
2281 numeric n[];
2282 path pth[];
2283 pickup quill;
2284 %% left stem
2285 lft x1=pcshiftx+jut; top y1=h;
2286 x2=x1; bot y2=0;
2287 %% start of bowl
2288 x13=x1; y13=3/4h;
2289 %% bottom of right and middle stems
2290 rt x6 = w -pcshiftx - jut; y6=y2;
2291 z4 = 1/2[z2,z6];
2292 %% top of middle and right stems
2293 x3=x4; y3=y1;
2294 x5=x6; y5=y13;
2295 %% top of bowls
2296 x14=2/3[x13,x3]; top y14 = h;
2297 x33=x4; y33=y13;
2298 x34=2/3[x33,x5]; y34 = y14;
2299 %%ductus:=true;
2300 if ductus:
2301 pickup stylus;
2302 fi
2303 draw_tstem(1,2,srad); % left half
2304 draw_flatserif(1,2,srad);
2305 draw_roundserif(2,1,srad);
2306 draw z13{pdir}..z14{right}..z33{down}--z4;
2307 draw_roundserif(4,3,srad);
2308 draw z33{pdir}..z34{right}..z5{down}--z6;
2309 draw_roundserif(6,5,srad);
2310 ductus:=false;
2311 penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100);
2312 endchar; % end "m"
2313
2314 % \end{macrocode}
2315 % \end{routine}
2316 %
2317 % \begin{routine}{n}
2318 % The letter `n'. This could be like a capital `N' or a lower-case `n'.
2319 % I have chosen to do the second form.
2320 % \begin{macrocode}
2321 cmchar "IMIN letter n";
2322 beginchar("n", 2sb#+hstretch*(5/8x_height#+2jut#),
2323 x_height#, 0);
2324 adjust_fit(0,0);
2325 pcshiftx := sb;
2326 pickup quill;
2327 %% left stem
2328 lft x1=pcshiftx+jut; top y1=h;
2329 x2=x1; bot y2=0;
2330 % start of bowl
2331 x13=x1; y13=3/4h;
2332 %% right stem
2333 rt x4 = w-pcshiftx-jut; y4=y2;
2334 x3 = x4; y3 = y13;
2335 % top of bowl
2336 x14 = 2/3[x13,x3]; top y14 = h;
2337 %%ductus:=true;
2338 if ductus:
2339 pickup stylus;
2340 fi
2341 draw_tstem(1,2,srad); % left stem
2342 draw_flatserif(1,2,srad);
2343 draw_roundserif(2,1,srad);
2344 draw z13{pdir}..z14{right}..z3{down}--z4;
2345 draw_roundserif(4,3,srad);
2346 ductus:=false;
2347 penlabels(1,2,3,4,5,6,13,14,100);
2348 endchar; % end "n"
2349
2350 % \end{macrocode}
2351 % \end{routine}
2352 %
2353 % \begin{routine}{o}
2354 % The letter `o'.
2355 % \begin{macrocode}
2356 cmchar "IMIN letter o";
2357 beginchar("o", 2sb#+hstretch*(3/4x_height#),
2358 x_height#, 0);
2359 adjust_fit(0,0);
2360 pcshiftx := sb;
2361 pickup quill;
2362 lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2;
2363 x2=x4=w/2; top y2=h+o; bot y4=-o;
2364 draw z1..z2..z3..z4..cycle;
2365 z5=(pcshiftx,-o);
2366 obowl(5, w-2pcshiftx, h+2o);
2367 %%ductus:=true;
2368 if ductus:
2369 pickup stylus;
2370 draw obfirst; draw obsecond; draw obouter; draw obinner;
2371 else:
2372 %% fill obouter; unfill obinner;
2373 fi
2374 ductus:=false;
2375 penlabels(1,2,3,4,5,100);
2376 endchar; % end "o"
2377
2378 % \end{macrocode}
2379 % \end{routine}
2380 %
2381 % \begin{routine}{p}
2382 % The letter `p'.
2383 % \begin{macrocode}
2384 cmchar "IMIN letter p";
2385 beginchar("p", 2sb#+hstretch*(3/4x_height#+jut#),
2386 x_height#, desc_depth#);
2387 adjust_fit(0,0);
2388 pcshiftx := sb;
2389 numeric n[];
2390 pickup quill;
2391 %% stem
2392 lft x1=lft x2=pcshiftx+jut;
2393 top y1=h; bot y2=-1/2d;
2394 lft x20 = pcshiftx; bot y20 = -d;
2395 %% bowl % from "h"
2396 z3=3/4[(x1,0),z1];
2397 rt x5 = w-pcshiftx; y5=y3;
2398 x4=1/2[x3,x5]; top y4 = h;
2399 lft x6=x4; bot y6=0;
2400
2401 %%ductus:=true;
2402 if ductus:
2403 pickup stylus;
2404 fi
2405 draw_tstem(1,2,srad); % stem
2406 draw_flatserif(1,2,srad);
2407 draw z2{down}..z20{-pdir};
2408 draw z3{pdir}..z4..z5..z6{-pdir}; % bowl (from h)
2409 ductus:=false;
2410 penlabels(1,2,3,4,5,6,7,8,100);
2411 endchar; % end "p"
2412
2413 % \end{macrocode}
2414 % \end{routine}
2415 %
2416 % \begin{routine}{q}
2417 % The letter `q'.
2418 % \begin{macrocode}
2419 cmchar "IMIN letter q";
2420 beginchar("q", 2sb#+hstretch*(3/4x_height#),
2421 x_height#, desc_depth#);
2422 adjust_fit(0,0);
2423 pcshiftx := sb;
2424 numeric n[];
2425 pickup quill;
2426 %% right stem
2427 rt x1=w-pcshiftx; top y1=h;
2428 x2=x1; bot y2=-1/2d;
2429 x20 = x1-jut; bot y20=-d;
2430 %% bowl
2431 z3=1/4[(x1,0),z1];
2432 lft x5=pcshiftx; y5=y3;
2433 x4=1/2[x3,x5]; bot y4=0;
2434 x6=x1-jut; top y6=h;
2435 %%ductus:=true;
2436 if ductus:
2437 pickup stylus;
2438 fi
2439 draw_tstem(1,2,srad);
2440 draw z2{down}..z20{-pdir}; % stem
2441 draw_flatserif(1,2,srad);
2442 draw z3{-pdir}..z4{left}..z5{up}..z6{pdir};
2443 ductus:=false;
2444 penlabels(0,1,2,3,4,5,6,7,8,100);
2445 endchar; % end "q"
2446
2447 % \end{macrocode}
2448 % \end{routine}
2449 %
2450 % \begin{routine}{r}
2451 % The letter `r'.
2452 % \begin{macrocode}
2453 cmchar "IMIN letter r";
2454 beginchar("r", sb#+hstretch*(7/8x_height#+jut#),
2455 x_height#, desc_depth#);
2456 adjust_fit(0,0);
2457 pcshiftx := sb;
2458 numeric n[];
2459 pickup quill;
2460 %% stem
2461 lft x1=lft x2=pcshiftx+jut;
2462 top y1=h; bot y2=-1/2d;
2463 lft x20 = pcshiftx; bot y20 = -d;
2464 %% bowl
2465 z3=3/4[(x1,0),z1];
2466 rt x5 = w-pcshiftx; y5=y3;
2467 x4=1/2[x3,x5]; top y4 = h;
2468 %%ductus:=true;
2469 if ductus:
2470 pickup stylus;
2471 fi
2472 draw_tstem(1,2,srad); % stem
2473 draw_flatserif(1,2,srad);
2474 draw z2{down}..z20{-pdir};
2475
2476 draw z3{pdir}..z4{right}..z5{pdir};
2477
2478 ductus:=false;
2479 penlabels(1,2,3,4,5,6,7,8,9,100);
2480 endchar; % end "r"
2481
2482 % \end{macrocode}
2483 % \end{routine}
2484 %
2485 % \begin{routine}{s}
2486 % The letter `s'. This is a `long' S.
2487 % \begin{macrocode}
2488 cmchar "IMIN letter s";
2489 beginchar("s", 2sb#+hstretch*(3/4x_height#+jut#),
2490 asc_height#, desc_depth#);
2491 adjust_fit(0,0);
2492 numeric n[];
2493 pcshiftx := sb;
2494 pickup quill;
2495 %% stem
2496 lft x1=lft x2=pcshiftx+jut; top y1=h/ascratio; bot y2=-1/2d;
2497 lft x20=pcshiftx; bot y20=-d;
2498 %% flick
2499 x4=x2; y4 = 1/2h/ascratio;
2500 rt x6=w-pcshiftx; y6 = 2/3h;
2501 x5 = 2/3[x4,x6]; top y5=h;
2502 %%ductus:=true;
2503 if ductus:
2504 pickup stylus;
2505 fi
2506 draw_tstem(1,2,srad); % stem
2507 draw z2{down}..z20{-pdir};
2508 draw_flatserif(1,2,srad);
2509 draw z4{up}...z5{right}...z6;
2510 ductus:=false;
2511 penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100);
2512 endchar; % end "s"
2513
2514 % \end{macrocode}
2515 % \end{routine}
2516 %
2517 % \begin{routine}{t}
2518 % The letter `t'.
2519 % \begin{macrocode}
2520 cmchar "IMIN letter t";
2521 beginchar("t", 2sb#+hstretch*(5/4x_height#),
2522 x_height#, 0);
2523 adjust_fit(0,0);
2524 pcshiftx := sb;
2525 numeric n[];
2526 pickup quill;
2527 %% bar
2528 lft x1 = pcshiftx; top y1=h; rt x2=w-pcshiftx; bot y2=h;
2529 n1 := w; % width of bowl
2530 n2 := h; % height of bowl
2531 z3=1/2[z1,z2];
2532 lft x4 = pcshiftx + 1/8n1; y4 = 1/2h;
2533 x5=x3; bot y5 = 0;
2534 rt x6 = pcshiftx + 3/4n1; top y6 = 1/4h;
2535 %%ductus:=true;
2536 if ductus:
2537 pickup stylus;
2538 fi
2539 draw z1{pdir}..z3..z2{pdir}; % bar
2540 draw z3..z4{down}..z5{right}..z6{pdir};
2541 ductus:=false;
2542 penlabels(1,2,3,4,5,6,11,12,100);
2543 endchar; % end "t"
2544
2545 % \end{macrocode}
2546 % \end{routine}
2547 %
2548 % \begin{routine}{u}
2549 % The letter `u'.
2550 % \begin{macrocode}
2551 cmchar "IMIN letter u";
2552 beginchar("u", 2sb#+hstretch*(5/8x_height#+2jut#),
2553 x_height#, 0);
2554 adjust_fit(0,0);
2555 pcshiftx := sb;
2556 numeric n[];
2557 pickup quill;
2558 %% left stem
2559 lft x1 = pcshiftx + jut; top y1 = h;
2560 % start of bowl
2561 x13=x1; y13=1/3h;
2562 % right stem
2563 rt x3=w-pcshiftx-jut; y3=y1;
2564 x4=x3; bot y4=0;
2565 z33=1/4[z4,z3]; % start of bowl
2566 % middle of bowl
2567 x14=1/3[x1,x3]; bot y14=0;
2568 %%ductus:=true;
2569 if ductus:
2570 pickup stylus;
2571 fi
2572 draw z1--z13{down}..z14{right}..z33{pdir};
2573 draw_flatserif(1,13,srad);
2574 draw_tstem(3,4,srad); % right stem
2575 draw_flatserif(3,4,srad);
2576 draw_roundserif(4,3,srad);
2577 ductus:=false;
2578 penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100);
2579 endchar; % end "u"
2580
2581 % \end{macrocode}
2582 % \end{routine}
2583 %
2584 % \begin{routine}{v}
2585 % The letter `v'.
2586 % \begin{macrocode}
2587 cmchar "IMIN letter v";
2588 beginchar("v", 2sb#+hstretch*(3/4x_height#+jut#),
2589 x_height#, 0);
2590 adjust_fit(0,0);
2591 pcshiftx := sb;
2592 pickup quill;
2593 %% left stem
2594 lft x1 = pcshiftx + jut; top y1 = h;
2595 % start of bowl
2596 x13=x1; y13=1/3h;
2597 % right stem
2598 rt x3=w-pcshiftx-jut; y3=y1;
2599 x4=x3; bot y4=0;
2600 z33=1/4[z4,z3]; % start of bowl
2601 % middle of bowl
2602 x14=1/3[x1,x3]; bot y14=0;
2603 rt x23=w-pcshiftx; y23=3/4h;
2604 lft x26=x14; top y26=h;
2605 %%ductus:=true;
2606 if ductus:
2607 pickup stylus;
2608 fi
2609 draw z1--z13{down}..z14{right}; % left stem
2610 draw_flatserif(1,13,srad);
2611 draw z14{pdir}..z23{up}..z26;
2612
2613 ductus:=false;
2614 penlabels(1,2,3,4,5,11,13,14,23,26,100);
2615 endchar; % end "v"
2616
2617 % \end{macrocode}
2618 % \end{routine}
2619 %
2620 % \begin{routine}{w}
2621 % The letter `w'. This is a modern version as the font did not have a W.
2622 % \begin{macrocode}
2623 cmchar "IMIN letter w";
2624 beginchar("w", 2sb#+hstretch*(x_height#+2jut#),
2625 x_height#, 0);
2626 adjust_fit(0,0);
2627 pcshiftx := sb;
2628 pickup quill;
2629 %% left stem
2630 lft x1 = pcshiftx + jut; top y1 = h;
2631 % start of bowl
2632 x13=x1; y13=1/3h;
2633 % right stem
2634 rt x5=w-pcshiftx-jut; y5=y1;
2635 x6=x5; bot y6=0;
2636 z53=1/4[z6,z5]; % start of bowl
2637 % middle stem
2638 z3 = 1/2[z1,z5];
2639 z33=(x3,y13);
2640 % middle of bowl
2641 x14=1/3[x1,x3]; bot y14=0;
2642 % middle of right bowl
2643 x34=1/3[x3,x5]; y34=y14;
2644 %%ductus:=true;
2645 if ductus:
2646 pickup stylus;
2647 fi
2648 draw z1--z13{down}..z14{right}..z33{pdir}; % left
2649 draw_flatserif(1,13,srad);
2650 draw z3--z33{down}..z34{right}..z53{pdir}; % middle
2651 draw_flatserif(3,33,srad);
2652 draw_tstem(5,6,srad); % right stem
2653 draw_flatserif(5,6,srad);
2654 draw_roundserif(6,5,srad);
2655 ductus:=false;
2656 penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100);
2657 endchar; % end "w"
2658
2659 % \end{macrocode}
2660 % \end{routine}
2661 %
2662 % \begin{routine}{x}
2663 % The letter `x'.
2664 % \begin{macrocode}
2665 cmchar "IMIN letter x";
2666 beginchar("x", 2sb#+hstretch*(x_height#),
2667 x_height#, desc_depth#);
2668 adjust_fit(0,0);
2669 numeric n[];
2670 pcshiftx := sb;
2671 pickup quill;
2672 n1 := w-2pcshiftx; % total width
2673 n2 := thick; % triangle side
2674 %% diag top left to bottom right
2675 lft x1=pcshiftx; bot y1=2/3h;
2676 x2=pcshiftx+1/7n1; top y2=h;
2677 x5=pcshiftx+11/14n1; bot y5=-1/4d;
2678 rt x6=pcshiftx+n1; top y6=1/6h;
2679 z25 = 1/3[z2,z5];
2680 %% diag bottom left to top right
2681 lft x10 = -w + 2pcshiftx; bot y10=-d;
2682 x50=x5; top y50=h;
2683 rt x60 = w -pcshiftx; bot y60=2/3h;
2684 x40=pcshiftx+8/14n1; y40=h;
2685 %%ductus:=true;
2686 if ductus:
2687 pickup stylus;
2688 fi
2689 draw z1..z2{right}..z5{right}..z6; % top left to bottom right
2690 draw z10{1/2pdir}..z25..z50{right}..z60; % bottom left to top right
2691 ductus:=false;
2692 penlabels(1,2,3,4,5,6,7,8,10,40,50,60,100);
2693 endchar; % end "x"
2694
2695 % \end{macrocode}
2696 % \end{routine}
2697 %
2698 % \begin{routine}{y}
2699 % The letter `y'. Modern, but with a dot on top.
2700 % \begin{macrocode}
2701 cmchar "IMIN letter y";
2702 beginchar("y", 2sb#+hstretch*(5/8x_height#+jut#),
2703 x_height#, desc_depth#);
2704 adjust_fit(0,0);
2705 pcshiftx := u;
2706 pickup quill;
2707 %% left stem
2708 lft x1 = pcshiftx + jut; top y1 = h;
2709 % start of bowl
2710 x13=x1; y13=1/3h;
2711 % right stem
2712 rt x3=w-pcshiftx; y3=y1;
2713 x4=x3; bot y4=0;
2714 z33=1/4[z4,z3]; % start of bowl
2715 % middle of bowl
2716 x14=1/3[x1,x3]; bot y14=0;
2717 z50=(x3,-1/2d);
2718 x60=x14; bot y60=-d;
2719 %%ductus:=true;
2720 if ductus:
2721 pickup stylus;
2722 fi
2723 draw z1--z13{down}..z14{right}..z33{pdir};
2724 draw_flatserif(1,13,srad);
2725 draw_tstem(3,50,srad); % right stem
2726 draw z50{down}..z60{-pdir};
2727 draw_flatserif(3,4,srad);
2728 ductus:=false;
2729 penlabels(1,2,3,4,5,6,7,8,9,10,100);
2730 endchar; % end "y"
2731
2732 % \end{macrocode}
2733 % \end{routine}
2734 %
2735 %
2736 % \begin{routine}{z}
2737 % The letter `z'.
2738 % \begin{macrocode}
2739 cmchar "IMIN letter z";
2740 beginchar("z", 2sb#+hstretch*(x_height#),
2741 x_height#, 0);
2742 adjust_fit(0,0);
2743 numeric n[];
2744 pcshiftx := sb;
2745 pickup quill;
2746 %% top bar
2747 n10 := w-2pcshiftx; % letter width
2748 lft x1=pcshiftx; top y1=h;
2749 rt x2= w-pcshiftx; bot y2=y1;
2750 %% diagonal
2751 x3=x1; bot y3=0;
2752 %% bowl
2753 x4=3/4[x1,x2]; top y4 = 1/2h;
2754 x6=x4; bot y6 = 0;
2755 rt x5 = w-pcshiftx; y5 = 1/2[y4,y6];
2756 x7=1/2[x3,x5]; y7 = 1/2[y6,y5];
2757 %%ductus:=true;
2758 if ductus:
2759 pickup stylus;
2760 fi
2761 draw z1{right}..z2{right}; % top bar
2762 draw_roundserif(1,2,srad);
2763 draw z2--z3; % diagonal
2764 draw z3..z4{right}..z5{down}..z6{left}..z7;
2765 ductus:=false;
2766 penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100);
2767 endchar; % end "z"
2768
2769 % \end{macrocode}
2770 % \end{routine}
2771 %
2772 %
2773 % The end of this file
2774 % \begin{macrocode}
2775 %</min>
2776 % \end{macrocode}
2777 %
2778 %
2779 % \subsection{The code for capital letters}
2780 %
2781 % \thisfont{} `capitals' were drawn with the same pen as for the minuscules,
2782 % and the letters were merely larger versions of the minuscules.
2783 %
2784 % \begin{macrocode}
2785 %<*maj>
2786 % IMINU.MF Program file for Insular Minuscule `capitals'
2787 %
2788
2789 % \end{macrocode}
2790 %
2791 %
2792 %
2793 % \begin{routine}{A}
2794 % The letter `A'.
2795 % \begin{macrocode}
2796 cmchar "IMIN letter A";
2797 beginchar("A", 2sb#+caprat*hstretch*(3/4x_height#+jut#),
2798 caprat*x_height#, 0);
2799 adjust_fit(0,0);
2800 pcshiftx := sb;
2801 numeric n[];
2802 path pth[];
2803 pair pr[];
2804 pickup quill;
2805 n1 := w - 2pcshiftx -jut; % effective letter width
2806 % "stem"
2807 x1 = pcshiftx + 2/3n1; top y1=h;
2808 rt x2 = pcshiftx + n1; bot y2=0;
2809
2810 z16 = 1/6[z2,z1];
2811 rt x6 = x16; y6=y16;
2812
2813 lft x4 = pcshiftx; y4 = 1/2h;
2814
2815 % stem path
2816 pth1 := z1{down}..z2;
2817 pr1 := direction 1 of pth1;
2818 z20 = z2 shifted -10pr1;
2819
2820 %%ductus:=true;
2821 if ductus:
2822 pickup stylus;
2823 else:
2824 % draw stem
2825 draw pth1;
2826 draw_roundserif(2,20,srad);
2827 % draw bowl
2828 draw z1{-pdir}..z4{down}..z6{pdir};
2829 fi
2830 ductus:=false;
2831 penlabels(1,2,3,4,5,6,7,8,100);
2832 endchar; % end "A"
2833
2834 % \end{macrocode}
2835 % \end{routine}
2836 %
2837 % \begin{routine}{B}
2838 % The letter `B'.
2839 % \begin{macrocode}
2840 cmchar "IMIN letter B";
2841 beginchar("B", 2sb#+caprat*hstretch*(3/4x_height#),
2842 caprat*asc_height#, 0);
2843 adjust_fit(0,0);
2844 numeric n[];
2845 path pth[];
2846 pcshiftx := sb;
2847 pickup quill;
2848 n1:=w-2pcshiftx; % actual letter width
2849 n2:=h/ascratio; % top of bowl
2850 lft x1 = pcshiftx+jut; top y1=h;
2851 lft x3 = pcshiftx; y3=1/2n2;
2852 rt x5 = w-pcshiftx; y5=y3;
2853 x4 = 1/2[x3,x5]; bot y4=0;
2854 x6=x4; top y6=n2;
2855 pth1 := z1..z3{down}..z4{right}.. z5{up};
2856 z98=(0,3/4n2); z99=(w,y98);
2857 pth2 := z98--z99;
2858 z7 = pth1 intersectionpoint pth2;
2859 %%ductus:=true;
2860 if ductus:
2861 pickup stylus;
2862 fi
2863 draw z1..z3{down}..z4{right}..z5{up}..z6{left}..z7{-pdir};
2864 draw_flatserif(1,7,srad);
2865 ductus:=false;
2866 penlabels(1,2,3,4,5,6,7,8,9,100);
2867 endchar; % end "B"
2868
2869 % \end{macrocode}
2870 % \end{routine}
2871 %
2872 %
2873 % \begin{routine}{C}
2874 % The letter `C'.
2875 % \begin{macrocode}
2876 cmchar "IMIN letter C";
2877 beginchar("C", 2sb#+caprat*hstretch*(5/8x_height#),
2878 caprat*x_height#, 0);
2879 adjust_fit(0,0);
2880 numeric n[];
2881 pcshiftx := sb;
2882 pickup quill;
2883 n1:=w-2pcshiftx; % actual letter width
2884 n2:=6/5w-2pcshiftx; % width of full bowl
2885 x1=pcshiftx + 1/2n1; top y1 = h;
2886 lft x2 = pcshiftx; y2 = 1/2h;
2887 x3 = x1; bot y3 = 0;
2888 rt x4 = w-pcshiftx; y4 = 1/4h;
2889 x24 = x4; y24 = 3/4h;
2890 %%ductus:=true;
2891 if ductus:
2892 pickup stylus;
2893 fi
2894 draw z24..z1{left}..z2{down}..z3{right}..z4{pdir};
2895 ductus:=false;
2896 penlabels(1,2,3,4,5,6,14,16,17,18,100);
2897 endchar; % end "C"
2898
2899 % \end{macrocode}
2900 % \end{routine}
2901 %
2902 % \begin{routine}{D}
2903 % The letter `D'. There is a choice between a curved and straight stem.
2904 % I have done the straight one.
2905 % \begin{macrocode}
2906 cmchar "IMIN letter D";
2907 beginchar("D", 2sb#+caprat*hstretch*(3/4x_height#),
2908 caprat*asc_height#, 0);
2909 adjust_fit(0,0);
2910 numeric n[];
2911 path pth[];
2912 pcshiftx := sb;
2913 pickup quill;
2914 lft x1=pcshiftx; top y1=h;
2915 rt x3 = w-pcshiftx; y3 = 1/2h/ascratio;
2916 x4 = 1/2[x1,x3]; bot y4 = 0;
2917 z5=(x1,y3);
2918 z98=(0,h/ascratio); z99=(w,y98); pth2 := z98--z99;
2919 pth1 := z1{-ppdir}..z3{down}..z4{left};
2920 z6 = pth1 intersectionpoint pth2;
2921 if ductus:
2922 pickup stylus;
2923 fi
2924 draw z1{-ppdir}..z3{down}..z4{left}..z5{up}..z6{pdir};
2925 ductus:=false;
2926 penlabels(0,1,2,3,4,5,6,7,8,100);
2927 endchar; % end "D"
2928
2929 % \end{macrocode}
2930 % \end{routine}
2931 %
2932 % \begin{routine}{E}
2933 % The letter `E'.
2934 % \begin{macrocode}
2935 cmchar "IMIN letter E";
2936 beginchar("E", sb#+caprat*hstretch*(5/4x_height#),
2937 caprat*x_height#, 0);
2938 adjust_fit(0,0);
2939 pcshiftx := sb;
2940 numeric n[];
2941 path pth[];
2942 pickup quill;
2943 n1 := w-pcshiftx; % actual letter width
2944 n2 := 4/8n1; % width of bowl
2945 x1 = pcshiftx + 5/8n2; top y1=h;
2946 lft x2 = pcshiftx; y2 = 1/2h;
2947 x3 = pcshiftx + 1/2n2; bot y3 = 0;
2948 rt x4 = pcshiftx + n2; y4 = 1/4h;
2949 z98=(0,3/8h); z99=(w,y98);
2950 pth1 := z98--z99;
2951 pth2 := z1{left}..z2{down}..z3{right};
2952 z7 = pth1 intersectionpoint pth2;
2953 rt x9 = w-pcshiftx; y9 = 3/4h;
2954 z8=1/2[z7,z9];
2955 %%ductus:=true;
2956 if ductus:
2957 pickup stylus;
2958 fi
2959 draw z7{pdir}..z1{left}..z2{down}..z3{right}..z4{pdir};
2960 draw z7{pdir}..z8{right}..z9{pdir};
2961 ductus:=false;
2962 penlabels(1,2,3,4,5,6,7,8,9,100);
2963 endchar; % end "e"
2964
2965 % \end{macrocode}
2966 % \end{routine}
2967 %
2968 % \begin{routine}{F}
2969 % The letter `F'.
2970 % \begin{macrocode}
2971 cmchar "IMIN letter F";
2972 beginchar("F", 2sb#+caprat*hstretch*(3/4x_height#+jut#),
2973 caprat*(x_height#), desc_depth#);
2974 adjust_fit(0,0);
2975 pcshiftx := sb;
2976 pickup quill;
2977 %% stem
2978 lft x1=lft x2=pcshiftx+jut;
2979 top y1=h; y2=-1/2d;
2980 lft x20=0; bot y20=-d;
2981 %% bottom bar
2982 z4=(rt x1,-thin); rt x6=w-pcshiftx; y6=y4+2thin; z5=1/2[z4,z6];
2983 %% top bar
2984 x7= x1; bot y7 = 1/2h;
2985 rt x9= w-pcshiftx; y9 = 1/2[y7,y1];
2986 x8 = 2/3[x7,x9]; top y8 = h;
2987 %%ductus:=true;
2988 if ductus:
2989 pickup stylus;
2990 fi
2991 draw_tstem(1,2,srad); % stem
2992 draw z2{down}..z20{-pdir};
2993 draw_flatserif(1,2,srad);
2994 draw z4{dir(45)}..z5{right}..z6{dir(45)}; % bottom bar
2995 draw z7..z8..z9; % top bar
2996 ductus:=false;
2997 penlabels(1,2,3,4,5,6,7,100);
2998 endchar; % end "F"
2999
3000 % \end{macrocode}
3001 % \end{routine}
3002 %
3003 % \begin{routine}{G}
3004 % The letter `G'.
3005 % \begin{macrocode}
3006 cmchar "IMIN letter G";
3007 beginchar("G", 2sb#+caprat*hstretch*(x_height#),
3008 caprat*x_height#, desc_depth#);
3009 adjust_fit(0,0);
3010 path pth[];
3011 pair vec[];
3012 pcshiftx := sb;
3013 pickup quill;
3014 %% top bar
3015 lft x1=pcshiftx; top y1=h; rt x2=w-pcshiftx; top y2=h;
3016 x3=1/2[x1,x2]; bot y3=1/8h;
3017 rt x5 = w-pcshiftx; y5 = -1/2d;
3018 x6 = x3; bot y6 = -d;
3019 x7 = 1/2[x1,x3]; y7 = y5;
3020 x8=x3; y8 = -y3;
3021 %%ductus:=true;
3022 if ductus:
3023 pickup stylus;
3024 draw z1--z2; % top bar
3025 draw pth1; draw pth2; % curves
3026 draw rt z8--z9; % diagonal
3027 else:
3028 draw z1--z2;
3029 draw z2--z3;
3030 draw z3{pdir}..z5{down}..z6{left}..z7{up}..z8{pdir};
3031 draw_roundserif(1,2,srad);
3032 fi
3033 ductus:=false;
3034 penlabels(1,2,3,4,5,6,7,8,9,100);
3035 endchar; % end "G"
3036
3037 % \end{macrocode}
3038 % \end{routine}
3039 %
3040 % \begin{routine}{H}
3041 % The letter `H'.
3042 % \begin{macrocode}
3043 cmchar "IMIN letter H";
3044 beginchar("H", 2sb#+caprat*hstretch*(7/8x_height#+jut#),
3045 caprat*asc_height#, 0);
3046 adjust_fit(0,0);
3047 pcshiftx := sb;
3048 pickup quill;
3049 numeric n[];
3050 %% stem
3051 lft x1=lft x2=pcshiftx+jut;
3052 top y1=h; bot y2=0;
3053 %% bowl
3054 z3=1/2[z2,z1];
3055 rt x5 = w-pcshiftx; y5=y3;
3056 x4=1/2[x3,x5]; top y4 = h/ascratio;
3057 lft x6=x4; bot y6=0;
3058 %%ductus:=true;
3059 if ductus:
3060 pickup stylus;
3061 fi
3062 draw_tstem(1,2,srad); % stem
3063 draw_flatserif(1,2,srad);
3064 draw_roundserif(2,1,srad);
3065 draw z3{pdir}..z4..z5..z6{-pdir};
3066
3067 ductus:=false;
3068 penlabels(1,2,3,4,5,6,100);
3069 endchar; % end "H"
3070
3071 % \end{macrocode}
3072 % \end{routine}
3073 %
3074 % \begin{routine}{I}
3075 % The letter `I'.
3076 % \begin{macrocode}
3077 cmchar "IMIN letter I";
3078 beginchar("I", 2sb#+caprat*hstretch*(thick#+2jut#),
3079 caprat*x_height#, 0);
3080 adjust_fit(0,0);
3081 pcshiftx := sb;
3082 pickup quill;
3083 lft x1=lft x2=pcshiftx+jut;
3084 top y1=h; bot y2=0;
3085 %%ductus:=true;
3086 draw_tstem(1,2,srad);
3087 draw_flatserif(1,2,srad);
3088 draw_roundserif(2,1,srad);
3089 ductus:=false;
3090 penlabels(1,2,100);
3091 endchar; % end "i"
3092
3093 % \end{macrocode}
3094 % \end{routine}
3095 %
3096 % \begin{routine}{J}
3097 % The letter `J'. This letter was not in the script, it being a later invention.
3098 % \begin{macrocode}
3099 cmchar "IMIN letter J";
3100 beginchar("J", sb#+caprat*hstretch*(3/8x_height#),
3101 caprat*x_height#, desc_depth#);
3102 adjust_fit(0,0);
3103 pcshiftx := sb;
3104 numeric n[];
3105 pickup quill;
3106 %% stem
3107 rt x1 = w-pcshiftx; top y1 = h;
3108 x2=x1; y2=-1/2d;
3109 %% bottom hook
3110 lft x3 = 0; bot y3 = -d;
3111 %%ductus:=true;
3112 if ductus:
3113 pickup stylus;
3114 fi
3115 draw z1--z2; % stem
3116 draw_flatserif(1,2,srad);
3117 draw z2{down}..z3{-pdir}; % hook
3118 ductus:=false;
3119 penlabels(1,2,3,100);
3120 endchar; % end "J"
3121
3122 % \end{macrocode}
3123 % \end{routine}
3124 %
3125 % \begin{routine}{K}
3126 % The letter `K'.
3127 % \begin{macrocode}
3128 cmchar "IMIN letter K";
3129 beginchar("K", 2sb#+caprat*hstretch*(x_height#+jut#),
3130 caprat*asc_height#, desc_depth#);
3131 adjust_fit(0,0);
3132 pcshiftx := sb;
3133 pickup quill;
3134 %% stem
3135 lft x1=lft x2=pcshiftx+jut;
3136 top y1=h; y2=-1/2d;
3137 lft x20=pcshiftx; bot y20=-d;
3138 %% top arm
3139 z3=(x1,1/2h/ascratio);
3140 rt x5=w-pcshiftx; y5=1/2[y3,y4];
3141 x4=1/2[x3,x5]; top y4=h/ascratio;
3142 %% lower arm
3143 x7=x5; bot y7=0;
3144 %%ductus:=true;
3145 if ductus:
3146 pickup stylus;
3147 fi
3148 draw_tstem(1,2,srad); % stem
3149 draw z2{down}..z20{-pdir};
3150 draw_flatserif(1,2,srad);
3151 draw z3..z4{right}..z5; % upper arm
3152 draw z3..{right}z7; % lower arm
3153 ductus:=false;
3154 penlabels(1,2,3,4,5,100);
3155 endchar; % end "K"
3156
3157 % \end{macrocode}
3158 % \end{routine}
3159 %
3160 % \begin{routine}{L}
3161 % The letter `L'.
3162 % \begin{macrocode}
3163 cmchar "IMIN letter L";
3164 beginchar("L", 2sb#+caprat*hstretch*(3/4x_height#),
3165 caprat*asc_height#, 0);
3166 adjust_fit(0,0);
3167 pcshiftx := sb;
3168 pickup quill;
3169 lft x2=pcshiftx; y2=1/5h;
3170 x1=x2+jut; top y1=h;
3171 rt x4=w-pcshiftx; y4=1/5h;
3172 x3=1/2[x2,x4]; bot y3=0;
3173 %%ductus:=true;
3174 if ductus:
3175 pickup stylus;
3176 fi
3177 draw z1{down}..z2..z3{right}..z4;
3178 draw_flatserif(1,2,srad);
3179 ductus:=false;
3180 penlabels(1,2,3,4,100);
3181 endchar; % end "L"
3182
3183 % \end{macrocode}
3184 % \end{routine}
3185 %
3186 % \begin{routine}{M}
3187 % The letter `M'.
3188 % \begin{macrocode}
3189 cmchar "IMIN letter M";
3190 beginchar("M", 2sb#+caprat*hstretch*(x_height#+2jut#),
3191 caprat*x_height#, 0);
3192 adjust_fit(0,0);
3193 pcshiftx := sb;
3194 numeric n[];
3195 path pth[];
3196 pickup quill;
3197 %% left stem
3198 lft x1=pcshiftx+jut; top y1=h;
3199 x2=x1; bot y2=0;
3200 %% start of bowl
3201 x13=x1; y13=3/4h;
3202 %% bottom of right and middle stems
3203 rt x6 = w -pcshiftx - jut; y6=y2;
3204 z4 = 1/2[z2,z6];
3205 %% top of middle and right stems
3206 x3=x4; y3=y1;
3207 x5=x6; y5=y13;
3208 %% top of bowls
3209 x14=2/3[x13,x3]; top y14 = h;
3210 x33=x4; y33=y13;
3211 x34=2/3[x33,x5]; y34 = y14;
3212 %%ductus:=true;
3213 if ductus:
3214 pickup stylus;
3215 fi
3216 draw_tstem(1,2,srad); % left half
3217 draw_flatserif(1,2,srad);
3218 draw_roundserif(2,1,srad);
3219 draw z13{pdir}..z14{right}..z33{down}--z4;
3220 draw_roundserif(4,3,srad);
3221 draw z33{pdir}..z34{right}..z5{down}--z6;
3222 draw_roundserif(6,5,srad);
3223 ductus:=false;
3224 penlabels(1,2,3,4,5,6,7,8,9,13,14,33,34,100);
3225 endchar; % end "M"
3226
3227 % \end{macrocode}
3228 % \end{routine}
3229 %
3230 % \begin{routine}{N}
3231 % The letter `N'. This could be like a capital `N' or a lower-case `n'.
3232 % I have chosen to do the first form.
3233 % \begin{macrocode}
3234 cmchar "IMIN letter N";
3235 beginchar("N", 2sb#+caprat*hstretch*(3/4x_height#+2jut#),
3236 caprat*x_height#, 0);
3237 adjust_fit(0,0);
3238 pcshiftx := sb;
3239 pickup quill;
3240 %% left stem
3241 lft x1=pcshiftx+jut; top y1=h;
3242 x2=x1; bot y2=0;
3243 %% right stem
3244 rt x3=w-pcshiftx-jut; y3=y1;
3245 z4=(x3,y2);
3246 %% bar
3247 z5=3/8[lft z2, lft z1]; z6=2/8[rt z4,rt z3];
3248 %%ductus:=true;
3249 if ductus:
3250 pickup stylus;
3251 fi
3252 draw_tstem(1,2,srad); % left stem
3253 draw_flatserif(1,2,srad);
3254 draw_roundserif(2,1,srad);
3255 draw_tstem(3,4,srad); % right stem
3256 draw_flatserif(3,4,srad);
3257 draw_roundserif(4,3,srad);
3258 draw z5{right}..z6{right}; % bar
3259 ductus:=false;
3260 penlabels(1,2,3,4,5,6,100);
3261 endchar; % end "N"
3262
3263 % \end{macrocode}
3264 % \end{routine}
3265 %
3266 % \begin{routine}{O}
3267 % The letter `O'.
3268 % \begin{macrocode}
3269 cmchar "IMIN letter O";
3270 beginchar("O", 2sb#+caprat*hstretch*(3/4x_height#),
3271 caprat*x_height#, 0);
3272 adjust_fit(0,0);
3273 pcshiftx := sb;
3274 pickup quill;
3275 lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2;
3276 x2=x4=w/2; top y2=h+o; bot y4=-o;
3277 draw z1..z2..z3..z4..cycle;
3278 z5=(pcshiftx,-o);
3279 obowl(5, w-2pcshiftx, h+2o);
3280 %%ductus:=true;
3281 if ductus:
3282 pickup stylus;
3283 draw obfirst; draw obsecond; draw obouter; draw obinner;
3284 else:
3285 %% fill obouter; unfill obinner;
3286 fi
3287 ductus:=false;
3288 penlabels(1,2,3,4,5,100);
3289 endchar; % end "O"
3290
3291 % \end{macrocode}
3292 % \end{routine}
3293 %
3294 % \begin{routine}{P}
3295 % The letter `P'.
3296 % \begin{macrocode}
3297 cmchar "IMIN letter P";
3298 beginchar("P", 2sb#+caprat*hstretch*(3/4x_height#+jut#),
3299 caprat*x_height#, desc_depth#);
3300 adjust_fit(0,0);
3301 pcshiftx := sb;
3302 numeric n[];
3303 pickup quill;
3304 %% stem
3305 lft x1=lft x2=pcshiftx+jut;
3306 top y1=h; bot y2=-1/2d;
3307 lft x20 = pcshiftx; bot y20 = -d;
3308 %% bowl % from "h"
3309 z3=3/4[(x1,0),z1];
3310 rt x5 = w-pcshiftx; y5=y3;
3311 x4=1/2[x3,x5]; top y4 = h;
3312 lft x6=x4; bot y6=0;
3313
3314 %%ductus:=true;
3315 if ductus:
3316 pickup stylus;
3317 fi
3318 draw_tstem(1,2,srad); % stem
3319 draw_flatserif(1,2,srad);
3320 draw z2{down}..z20{-pdir};
3321 draw z3{pdir}..z4..z5..z6{-pdir}; % bowl (from h)
3322 ductus:=false;
3323 penlabels(1,2,3,4,5,6,7,8,100);
3324 endchar; % end "P"
3325
3326 % \end{macrocode}
3327 % \end{routine}
3328 %
3329 % \begin{routine}{Q}
3330 % The letter `Q'.
3331 % \begin{macrocode}
3332 cmchar "IMIN letter Q";
3333 beginchar("Q", 2sb#+caprat*hstretch*(3/4x_height#),
3334 caprat*x_height#, desc_depth#);
3335 adjust_fit(0,0);
3336 pcshiftx := sb;
3337 numeric n[];
3338 pickup quill;
3339 %% right stem
3340 rt x1=w-pcshiftx; top y1=h;
3341 x2=x1; bot y2=-1/2d;
3342 x20 = x1-jut; bot y20=-d;
3343 %% bowl
3344 z3=1/4[(x1,0),z1];
3345 lft x5=pcshiftx; y5=y3;
3346 x4=1/2[x3,x5]; bot y4=0;
3347 x6=x1-jut; top y6=h;
3348 %%ductus:=true;
3349 if ductus:
3350 pickup stylus;
3351 fi
3352 draw_tstem(1,2,srad);
3353 draw z2{down}..z20{-pdir}; % stem
3354 draw_flatserif(1,2,srad);
3355 draw z3{-pdir}..z4{left}..z5{up}..z6{pdir};
3356 ductus:=false;
3357 penlabels(0,1,2,3,4,5,6,7,8,100);
3358 endchar; % end "Q"
3359
3360 % \end{macrocode}
3361 % \end{routine}
3362 %
3363 % \begin{routine}{R}
3364 % The letter `R'.
3365 % \begin{macrocode}
3366 cmchar "IMIN letter R";
3367 beginchar("R", sb#+caprat*hstretch*(3/4x_height#+jut#),
3368 caprat*x_height#, desc_depth#);
3369 adjust_fit(0,0);
3370 pcshiftx := sb;
3371 numeric n[];
3372 pickup quill;
3373 %% stem
3374 lft x1=lft x2=pcshiftx+jut;
3375 top y1=h; bot y2=-1/2d;
3376 lft x20 = pcshiftx; bot y20 = -d;
3377 %% bowl % almost a "p" bowl
3378 z3=3/4[(x1,0),z1];
3379 rt x5 = w-pcshiftx; y5=y3;
3380 x4=1/2[x3,x5]; top y4 = h;
3381 x100=x1; bot y100 = 0;
3382 lft x6= rt x100; y6=y100;
3383
3384 rt x26=w-pcshiftx; y26=-1/6d;
3385 %%ductus:=true;
3386 if ductus:
3387 pickup stylus;
3388 fi
3389 draw_tstem(1,2,srad); % stem
3390 draw_flatserif(1,2,srad);
3391 draw z2{down}..z20{-pdir};
3392 draw z3{pdir}..z4..z5..z6{-pdir}; % bowl (from h)
3393 draw z6{-ppdir}..z26{pdir}; % leg
3394 ductus:=false;
3395 penlabels(1,2,3,4,5,6,7,8,9,100);
3396 endchar; % end "R"
3397
3398 % \end{macrocode}
3399 % \end{routine}
3400 %
3401 % \begin{routine}{S}
3402 % The letter `S'. This is a `long' S.
3403 % \begin{macrocode}
3404 cmchar "IMIN letter S";
3405 beginchar("S", 2sb#+caprat*hstretch*(3/4x_height#+jut#),
3406 caprat*asc_height#, desc_depth#);
3407 adjust_fit(0,0);
3408 numeric n[];
3409 pcshiftx := sb;
3410 pickup quill;
3411 %% stem
3412 lft x1=lft x2=pcshiftx+jut; top y1=h/ascratio; bot y2=-1/2d;
3413 lft x20=pcshiftx; bot y20=-d;
3414 %% flick
3415 x4=x2; y4 = 1/2h/ascratio;
3416 rt x6=w-pcshiftx; y6 = 2/3h;
3417 x5 = 2/3[x4,x6]; top y5=h;
3418 %%ductus:=true;
3419 if ductus:
3420 pickup stylus;
3421 fi
3422 draw_tstem(1,2,srad); % stem
3423 draw z2{down}..z20{-pdir};
3424 draw_flatserif(1,2,srad);
3425 draw z4{up}...z5{right}...z6;
3426 ductus:=false;
3427 penlabels(1,2,3,4,5,6,7,11,17,20,26,27,28,100);
3428 endchar; % end "S"
3429
3430 % \end{macrocode}
3431 % \end{routine}
3432 %
3433 % \begin{routine}{T}
3434 % The letter `T'.
3435 % \begin{macrocode}
3436 cmchar "IMIN letter T";
3437 beginchar("T", 2sb#+caprat*hstretch*(5/4x_height#),
3438 caprat*x_height#, 0);
3439 adjust_fit(0,0);
3440 pcshiftx := sb;
3441 numeric n[];
3442 pickup quill;
3443 %% bar
3444 lft x1 = pcshiftx; top y1=h; rt x2=w-pcshiftx; bot y2=h;
3445 n1 := w; % width of bowl
3446 n2 := h; % height of bowl
3447 z3=1/2[z1,z2];
3448 lft x4 = pcshiftx + 1/8n1; y4 = 1/2h;
3449 x5=x3; bot y5 = 0;
3450 rt x6 = pcshiftx + 3/4n1; top y6 = 1/4h;
3451 %%ductus:=true;
3452 if ductus:
3453 pickup stylus;
3454 fi
3455 draw z1{pdir}..z3..z2{pdir}; % bar
3456 draw z3..z4{down}..z5{right}..z6{pdir};
3457 ductus:=false;
3458 penlabels(1,2,3,4,5,6,11,12,100);
3459 endchar; % end "T"
3460
3461 % \end{macrocode}
3462 % \end{routine}
3463 %
3464 % \begin{routine}{U}
3465 % The letter `U'.
3466 % \begin{macrocode}
3467 cmchar "IMIN letter U";
3468 beginchar("U", 2sb#+caprat*hstretch*(5/8x_height#+2jut#),
3469 caprat*x_height#, 0);
3470 adjust_fit(0,0);
3471 pcshiftx := sb;
3472 numeric n[];
3473 pickup quill;
3474 %% left stem
3475 lft x1 = pcshiftx + jut; top y1 = h;
3476 % start of bowl
3477 x13=x1; y13=1/3h;
3478 % right stem
3479 rt x3=w-pcshiftx-jut; y3=y1;
3480 x4=x3; bot y4=0;
3481 z33=1/4[z4,z3]; % start of bowl
3482 % middle of bowl
3483 x14=1/3[x1,x3]; bot y14=0;
3484 %%ductus:=true;
3485 if ductus:
3486 pickup stylus;
3487 fi
3488 draw z1--z13{down}..z14{right}..z33{pdir};
3489 draw_flatserif(1,13,srad);
3490 draw_tstem(3,4,srad); % right stem
3491 draw_flatserif(3,4,srad);
3492 draw_roundserif(4,3,srad);
3493 ductus:=false;
3494 penlabels(1,2,3,4,5,6,7,8,9,11,13,14,16,33,100);
3495 endchar; % end "U"
3496
3497 % \end{macrocode}
3498 % \end{routine}
3499 %
3500 % \begin{routine}{V}
3501 % The letter `V'.
3502 % \begin{macrocode}
3503 cmchar "IMIN letter V";
3504 beginchar("V", 2sb#+caprat*hstretch*(3/4x_height#+jut#),
3505 caprat*x_height#, 0);
3506 adjust_fit(0,0);
3507 pcshiftx := sb;
3508 pickup quill;
3509 %% left stem
3510 lft x1 = pcshiftx + jut; top y1 = h;
3511 % start of bowl
3512 x13=x1; y13=1/3h;
3513 % right stem
3514 rt x3=w-pcshiftx-jut; y3=y1;
3515 x4=x3; bot y4=0;
3516 z33=1/4[z4,z3]; % start of bowl
3517 % middle of bowl
3518 x14=1/3[x1,x3]; bot y14=0;
3519 rt x23=w-pcshiftx; y23=3/4h;
3520 lft x26=x14; top y26=h;
3521 %%ductus:=true;
3522 if ductus:
3523 pickup stylus;
3524 fi
3525 draw z1--z13{down}..z14{right}; % left stem
3526 draw_flatserif(1,13,srad);
3527 draw z14{pdir}..z23{up}..z26;
3528 ductus:=false;
3529 penlabels(1,2,3,4,5,11,13,14,23,26,100);
3530 endchar; % end "V"
3531
3532 % \end{macrocode}
3533 % \end{routine}
3534 %
3535 % \begin{routine}{W}
3536 % The letter `W'. This is a modern version as the font did not have a W.
3537 % \begin{macrocode}
3538 cmchar "IMIN letter W";
3539 beginchar("W", 2sb#+caprat*hstretch*(x_height#+2jut#),
3540 caprat*x_height#, 0);
3541 adjust_fit(0,0);
3542 pcshiftx := sb;
3543 pickup quill;
3544 %% left stem
3545 lft x1 = pcshiftx + jut; top y1 = h;
3546 % start of bowl
3547 x13=x1; y13=1/3h;
3548 % right stem
3549 rt x5=w-pcshiftx-jut; y5=y1;
3550 x6=x5; bot y6=0;
3551 z53=1/4[z6,z5]; % start of bowl
3552 % middle stem
3553 z3 = 1/2[z1,z5];
3554 z33=(x3,y13);
3555 % middle of bowl
3556 x14=1/3[x1,x3]; bot y14=0;
3557 % middle of right bowl
3558 x34=1/3[x3,x5]; y34=y14;
3559 %%ductus:=true;
3560 if ductus:
3561 pickup stylus;
3562 fi
3563 draw z1--z13{down}..z14{right}..z33{pdir}; % left
3564 draw_flatserif(1,13,srad);
3565 draw z3--z33{down}..z34{right}..z53{pdir}; % middle
3566 draw_flatserif(3,33,srad);
3567 draw_tstem(5,6,srad); % right stem
3568 draw_flatserif(5,6,srad);
3569 draw_roundserif(6,5,srad);
3570 ductus:=false;
3571 penlabels(1,2,3,4,5,6,7,8,9,11,13,14,33,34,53,16,100);
3572 endchar; % end "W"
3573
3574 % \end{macrocode}
3575 % \end{routine}
3576 %
3577 % \begin{routine}{X}
3578 % The letter `X'.
3579 % \begin{macrocode}
3580 cmchar "IMIN letter X";
3581 beginchar("X", 2sb#+caprat*hstretch*(x_height#),
3582 caprat*x_height#, desc_depth#);
3583 adjust_fit(0,0);
3584 numeric n[];
3585 pcshiftx := sb;
3586 pickup quill;
3587 n1 := w-2pcshiftx; % total width
3588 n2 := thick; % triangle side
3589 %% diag top left to bottom right
3590 lft x1=pcshiftx; bot y1=2/3h;
3591 x2=pcshiftx+1/7n1; top y2=h;
3592 x5=pcshiftx+11/14n1; bot y5=-1/4d;
3593 rt x6=pcshiftx+n1; top y6=1/6h;
3594 z25 = 1/3[z2,z5];
3595 %% diag bottom left to top right
3596 %%x10=x1; bot y10=-d;
3597 lft x10 = -w + 2pcshiftx; bot y10=-d;
3598 x50=x5; top y50=h;
3599 %%rt x60=x5; bot y60=2/3h;
3600 rt x60 = w -pcshiftx; bot y60=2/3h;
3601 x40=pcshiftx+8/14n1; y40=h;
3602 %%ductus:=true;
3603 if ductus:
3604 pickup stylus;
3605 fi
3606 draw z1..z2{right}..z5{right}..z6; % top left to bottom right
3607 draw z10{1/2pdir}..z25..z50{right}..z60; % bottom left to top right
3608 ductus:=false;
3609 penlabels(1,2,3,4,5,6,7,8,10,40,50,60,100);
3610 endchar; % end "X"
3611
3612 % \end{macrocode}
3613 % \end{routine}
3614 %
3615 % \begin{routine}{Y}
3616 % The letter `Y'. Modern style.
3617 % \begin{macrocode}
3618 cmchar "IMIN letter Y";
3619 beginchar("Y", 2sb#+caprat*hstretch*(5/8x_height#+jut#),
3620 caprat*x_height#, desc_depth#);
3621 adjust_fit(0,0);
3622 pcshiftx := u;
3623 pickup quill;
3624 %% left stem
3625 lft x1 = pcshiftx + jut; top y1 = h;
3626 % start of bowl
3627 x13=x1; y13=1/3h;
3628 % right stem
3629 rt x3=w-pcshiftx; y3=y1;
3630 x4=x3; bot y4=0;
3631 z33=1/4[z4,z3]; % start of bowl
3632 % middle of bowl
3633 x14=1/3[x1,x3]; bot y14=0;
3634 z50=(x3,-1/2d);
3635 x60=x14; bot y60=-d;
3636 %%ductus:=true;
3637 if ductus:
3638 pickup stylus;
3639 fi
3640 draw z1--z13{down}..z14{right}..z33{pdir};
3641 draw_flatserif(1,13,srad);
3642 draw_tstem(3,50,srad); % right stem
3643 draw z50{down}..z60{-pdir};
3644 draw_flatserif(3,4,srad);
3645 ductus:=false;
3646 penlabels(1,2,3,4,5,6,7,8,9,10,100);
3647 endchar; % end "Y"
3648
3649 % \end{macrocode}
3650 % \end{routine}
3651 %
3652 %
3653 % \begin{routine}{Z}
3654 % The letter `Z'.
3655 % \begin{macrocode}
3656 cmchar "IMIN letter Z";
3657 beginchar("Z", 2sb#+caprat*hstretch*(x_height#),
3658 caprat*x_height#, 0);
3659 adjust_fit(0,0);
3660 numeric n[];
3661 pcshiftx := sb;
3662 pickup quill;
3663 %% top bar
3664 n10 := w-2pcshiftx; % letter width
3665 lft x1=pcshiftx; top y1=h;
3666 rt x2= w-pcshiftx; bot y2=y1;
3667 %% diagonal
3668 x3=x1; bot y3=0;
3669 %% bowl
3670 x4=3/4[x1,x2]; top y4 = 1/2h;
3671 x6=x4; bot y6 = 0;
3672 rt x5 = w-pcshiftx; y5 = 1/2[y4,y6];
3673 x7=1/2[x3,x5]; y7 = 1/2[y6,y5];
3674 %%ductus:=true;
3675 if ductus:
3676 pickup stylus;
3677 fi
3678 draw z1{right}..z2{right}; % top bar
3679 draw_roundserif(1,2,srad);
3680 draw z2--z3; % diagonal
3681 draw z3..z4{right}..z5{down}..z6{left}..z7;
3682 ductus:=false;
3683 penlabels(1,2,3,4,5,6,10o,10i,20o,20i,100);
3684 endchar; % end "Z"
3685
3686 % \end{macrocode}
3687 % \end{routine}
3688 %
3689 %
3690 %
3691 % The end of this file
3692 % \begin{macrocode}
3693 %</maj>
3694 % \end{macrocode}
3695 %
3696 %
3697 %
3698 % \subsection{The punctuation file}
3699 %
3700 % The main punctuation marks are defined in this file.
3701 %
3702 % \begin{macrocode}
3703 %<*punct>
3704 % IMINPUNCT.MF This file contains punctuation marks
3705
3706 % \end{macrocode}
3707 %
3708 %
3709 % \begin{routine}{!}
3710 % The `!' character, which had not been invented at this time.
3711 % \begin{macrocode}
3712
3713 cmchar "Exclamation mark";
3714 beginchar("!", 2sb#+hstretch*(thick#+trijut#),
3715 asc_height#, 0);
3716 adjust_fit(0,0);
3717 pcshiftx := sb;
3718 pickup quill;
3719 x1=w/2; top y1 = h;
3720 z3=(x1, 1/2dot_size);
3721 z2=(x1, y3+3/2dot_size);
3722 draw z1--z2;
3723 draw_pdot(3,dot_size);
3724 penlabels(1,2,3);
3725
3726 endchar; % end of "!"
3727
3728 % \end{macrocode}
3729 % \end{routine}
3730 %
3731 % \begin{routine}{?}
3732 % The `?' character, which had not been invented at this time.
3733 % \begin{macrocode}
3734
3735 cmchar "Question mark";
3736 beginchar("?", 2sb#+hstretch*(3/4x_height#),
3737 asc_height#, 0);
3738 adjust_fit(0,0);
3739 pcshiftx := sb;
3740 numeric n[];
3741 path pth[];
3742 pickup quill;
3743 n1 := w-2pcshiftx; % actual character width
3744 n2 := 1/3h; % height of top bowl
3745 n3 := n2; % height of bottom bowl
3746 z5=(1/2w,1/2dot_size);
3747 x4 = x5; y4=y5+3/2dot_size;
3748 lft x1 = pcshiftx; y1 = 3/4h;
3749 x2 = 1/2w; top y2 = h;
3750 rt x3 = w-pcshiftx; y3 = 2/3h;
3751
3752 %%ductus:= true;
3753 if ductus:
3754 pickup stylus;
3755 fi
3756 draw z1..z2{right}..z3{down}..z4{down};
3757 draw_pdot(5, dot_size);
3758 penlabels(1,2,3,4,5);
3759 endchar; % end of "?"
3760
3761 % \end{macrocode}
3762 % \end{routine}
3763 %
3764 % \begin{routine}{,}
3765 % The `,' character.
3766 % \begin{macrocode}
3767
3768 cmchar "Comma";
3769 beginchar(",",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0);
3770 adjust_fit(0,0);
3771 pcshiftx:=sb;
3772 x1=w-pcshiftx-(0.5hstretch*dot_size); y1=1/2dot_size;
3773 draw_pcomma(1,dot_size,comma_width);
3774 penlabels(1);
3775 endchar; % end of ","
3776
3777 % \end{macrocode}
3778 % \end{routine}
3779 %
3780 % \begin{routine}{.}
3781 % The `.' character.
3782 % \begin{macrocode}
3783
3784 cmchar "Period";
3785 beginchar(".",2sb#+hstretch*(dot_size#),x_height#,0);
3786 pcshiftx:=sb;
3787 z1=(w/2, 1/2dot_size);
3788 draw_pdot(1,dot_size);
3789 penlabels(1);
3790 endchar; % end of "."
3791
3792 % \end{macrocode}
3793 % \end{routine}
3794 %
3795 %
3796 % \begin{routine}{:}
3797 % The `:' character.
3798 % \begin{macrocode}
3799
3800 cmchar "Colon";
3801 beginchar(":",2sb#+hstretch*(dot_size#),x_height#,0);
3802 pcshiftx:=sb;
3803 x1=x2=w/2; y1=2/3h; y2=1/3h;
3804 draw_pdot(1,dot_size);
3805 draw_pdot(2,dot_size);
3806 penlabels(1,2);
3807 endchar; % end ":"
3808
3809 % \end{macrocode}
3810 % \end{routine}
3811 %
3812 % \begin{routine}{;}
3813 % The `;' character.
3814 % \begin{macrocode}
3815
3816 cmchar "Semicolon";
3817 beginchar(";",2sb#+hstretch*(comma_width#+dot_size#),x_height#,0);
3818 adjust_fit(0,0);
3819 pcshiftx:=sb;
3820 x1=x2=w-pcshiftx-(0.5hstretch*dot_size); y1=2/3h; y2=1/3h;
3821 draw_pdot(1,dot_size);
3822 draw_pcomma(2,dot_size,comma_width);
3823 penlabels(1,2);
3824 endchar; % end of ";"
3825
3826 % \end{macrocode}
3827 % \end{routine}
3828 %
3829 % \begin{routine}{'}
3830 % The `'' character.
3831 % \begin{macrocode}
3832
3833 cmchar "Apostrophe";
3834 beginchar("'",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0);
3835 adjust_fit(0,0);
3836 pcshiftx:=sb;
3837 x1=w-pcshiftx-(0.5hstretch*dot_size); y1=h;
3838 draw_pcomma(1,dot_size,comma_width);
3839 penlabels(1);
3840 endchar; % end of "'"
3841
3842 % \end{macrocode}
3843 % \end{routine}
3844 %
3845 % \begin{routine}{`}
3846 % The ``' character.
3847 % \begin{macrocode}
3848
3849 cmchar "Reverse apostrophe";
3850 beginchar("`",2sb#+hstretch*(comma_width#+dot_size#),4/3x_height#,0);
3851 adjust_fit(0,0);
3852 pcshiftx:=sb;
3853 x1=pcshiftx+(0.5hstretch*dot_size); y1=h;
3854 draw_plq(1,dot_size,comma_width);
3855 penlabels(1);
3856 endchar; % end of "`"
3857
3858 % \end{macrocode}
3859 % \end{routine}
3860 %
3861 % The end of this file.
3862 % \begin{macrocode}
3863 %</punct>
3864 % \end{macrocode}
3865 %
3866 %
3867 % \subsection{The ligatures and dashes file}
3868 %
3869 % The ligatured letters, punctuation marks and dashes are defined in this file.
3870 % \begin{macrocode}
3871 %<*lig>
3872 % IMINLIG.MF Uncial ligatured letters, punctation and dashes
3873
3874 % \end{macrocode}
3875 % First the ligtables.
3876 % \begin{macrocode}
3877
3878 ligtable "`": "`"=:oct"134";
3879 ligtable "'": "'"=:oct"042"; %% , "?" kern 2u#, "!" kern 2u#;
3880
3881 ligtable "-": "-"=:oct"173";
3882 ligtable oct"173": "-"=:oct"174";
3883
3884 %%%%ligtable "f": "i"=:oct"014";
3885
3886 % \end{macrocode}
3887 %
3888 % \begin{routine}{''}
3889 % The `''' ligature.
3890 % \begin{macrocode}
3891
3892 cmchar "Closing quotes";
3893 beginchar(oct"042",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0);
3894 adjust_fit(0,0);
3895 pcshiftx:=sb;
3896 x1=w-pcshiftx-(0.5hstretch*dot_size); y1=y2=h;
3897 x2=x1-(2hstretch*dot_size);
3898 draw_pcomma(1,dot_size,comma_width); % right
3899 draw_pcomma(2,dot_size,comma_width); % left
3900 penlabels(1,2);
3901 endchar; % end of "''"
3902
3903 % \end{macrocode}
3904 % \end{routine}
3905 %
3906 % \begin{routine}{``}
3907 % The ```' ligature.
3908 % \begin{macrocode}
3909
3910 cmchar "Opening quotes";
3911 beginchar(oct"134",2sb#+hstretch*(comma_width#+3dot_size#),4/3x_height#,0);
3912 adjust_fit(0,0);
3913 pcshiftx:=sb;
3914 x1=pcshiftx+(0.5hstretch*dot_size); y1=y2=h;
3915 x2=x1+(2hstretch*dot_size);
3916 draw_plq(1,dot_size,comma_width); % left
3917 draw_plq(2,dot_size,comma_width); % right
3918 penlabels(1,2);
3919 endchar; % end of "``"
3920
3921 % \end{macrocode}
3922 % \end{routine}
3923 %
3924 % \begin{routine}{-}
3925 % The `-' (hyphen) character.
3926 % \begin{macrocode}
3927
3928 cmchar "Hyphen";
3929 beginchar("-",sb#+hstretch*(0.8x_height#),x_height#,0);
3930 adjust_fit(0,0);
3931 pcshiftx:=sb/2;
3932 numeric alpha; alpha:=w/8;
3933 %%pickup quill;
3934 %%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2;
3935 %%x11=lft x1+alpha/2; y11=top y1-0.5thin;
3936 %%x12=rt x2; y12=bot y1+0.5thin;
3937 %%draw_triangle(11,alpha);
3938 %%draw_rutriangle(12,alpha);
3939 pickup thickstylus;
3940 lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h;
3941 draw z21--z22;
3942 draw_roundserif(21,22,srad); draw_flatserif(22,21,srad);
3943 penlabels(1,2);
3944 endchar; % end of "-"
3945
3946 % \end{macrocode}
3947 % \end{routine}
3948 %
3949 % \begin{routine}{--}
3950 % The `--' (en-dash) ligature.
3951 % \begin{macrocode}
3952
3953 cmchar "En dash";
3954 beginchar(oct"173",sb#+hstretch*(x_height#),x_height#,0);
3955 adjust_fit(0,0);
3956 pcshiftx:=sb/2;
3957 numeric alpha; alpha:=w/8;
3958 pickup quill;
3959 %%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2;
3960 %%x11=lft x1+alpha/2; y11=top y1-0.5thin;
3961 %%x12=rt x2; y12=bot y1+0.5thin;
3962 %%draw_triangle(11,alpha);
3963 %%draw_rutriangle(12,alpha);
3964 pickup thickstylus;
3965 lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h;
3966 draw z21--z22;
3967 draw_roundserif(21,22,srad); draw_flatserif(22,21,srad);
3968 penlabels(1,2);
3969 endchar; % end of "--"
3970
3971 % \end{macrocode}
3972 % \end{routine}
3973 %
3974 % \begin{routine}{---}
3975 % The `---' (em dash) ligature. The em dash is twice the width of the en dash.
3976 % \begin{macrocode}
3977
3978 cmchar "Em dash";
3979 beginchar(oct"174",sb#+hstretch*(2x_height#),x_height#,0);
3980 adjust_fit(0,0);
3981 pcshiftx:=sb/2;
3982 numeric alpha; alpha:=w/8;
3983 pickup quill;
3984 %%lft x1 = pcshiftx; rt x2=w-pcshiftx; y1=y2=h/2;
3985 %%x11=lft x1+alpha/2; y11=top y1-0.5thin;
3986 %%x12=rt x2; y12=bot y1+0.5thin;
3987 %%draw_triangle(11,alpha);
3988 %%draw_rutriangle(12,alpha);
3989 pickup thickstylus;
3990 lft x21=pcshiftx; rt x22=w-pcshiftx; y21=y22=1/2h;
3991 draw z21--z22;
3992 draw_roundserif(21,22,srad); draw_flatserif(22,21,srad);
3993 penlabels(1,2);
3994 endchar; % end of "---"
3995
3996 % \end{macrocode}
3997 % \end{routine}
3998 %
3999 %
4000 % \begin{routine}{&}
4001 % The ampersand (which is really an `et' ligature).
4002 % \begin{macrocode}
4003
4004 cmchar "IMIN ampersand";
4005 beginchar("&", 2sb#+hstretch*(5/4x_height#), asc_height#, 0);
4006 adjust_fit(0,0);
4007 numeric n[];
4008 path pth[];
4009 pcshiftx:=sb;
4010 pickup quill;
4011 %% E part
4012 n1 := w-pcshiftx; % actual letter width
4013 n2 := 4/8n1; % width of bowl
4014 x1 = pcshiftx + 5/8n2; top y1=h;
4015 lft x2 = pcshiftx; y2 = 1/2h;
4016 x3 = pcshiftx + 1/2n2; bot y3 = 0;
4017 rt x4 = pcshiftx + n2; y4 = 1/4h;
4018 z98=(0,3/8h); z99=(w,y98);
4019 pth1 := z98--z99;
4020 pth2 := z1{left}..z2{down}..z3{right};
4021 z7 = pth1 intersectionpoint pth2;
4022 rt x9 = w-pcshiftx; y9 = 3/4h;
4023 z8=6/8[z7,z9];
4024
4025 %% T part
4026 x18=x8; bot y18=0;
4027 x19=5/8[x18,x9];
4028 y19=1/8h;
4029
4030
4031 %%ductus:=true;
4032 if ductus:
4033 pickup stylus;
4034 fi
4035 %% E part
4036 draw z7{pdir}..z1{left}..z2{down}..z3{right}..z4{up}..z8{right};
4037 draw z7{pdir}..z8{right}..z9{pdir};
4038 %% T bowl
4039 draw z8{left}..z4{down}..z18{right}..z19{pdir};
4040 ductus:=false;
4041 penlabels(1,2,3,4,5,6,7,8,9,10,16,17,18,19,31,32,33);
4042 endchar; % end of "&"
4043
4044 % \end{macrocode}
4045 % \end{routine}
4046 %
4047 %
4048 % The end of this file.
4049 % \begin{macrocode}
4050 %</lig>
4051 % \end{macrocode}
4052 %
4053 % \subsection{The digits file}
4054 %
4055 % These are arabic digits in the style of the book-hand. They are a
4056 % modern invention.
4057 %
4058 % \begin{macrocode}
4059 %<*dig>
4060 % IMINDIG.MF Program file for Insular Minuscule digits
4061 %
4062
4063 % \end{macrocode}
4064 %
4065 %
4066 %
4067 % \begin{routine}{1}
4068 % The digit `1'.
4069 % \begin{macrocode}
4070 cmchar "Uncial digit 1";
4071 beginchar("1", 2u#+fig_width#, fig_height#, 0);
4072 adjust_fit(0,0);
4073 pcshiftx := u;
4074 y100 = h/2; x100 = pcshiftx+y100; % square center
4075 pickup quill;
4076 x1=x2=w/2;
4077 y1=h; bot y2=0;
4078 %%ductus:=true;
4079 draw_tstem(1,2,srad);
4080 draw_flatserif(1,2,srad);
4081 draw_roundserif(2,1,srad);
4082 ductus:=false;
4083 proofpcbb(100, y100, y100);
4084 penlabels(1,2,100);
4085 endchar; % end "1"
4086
4087 % \end{macrocode}
4088 % \end{routine}
4089 %
4090 %
4091 % \begin{routine}{2}
4092 % The digit `2'.
4093 % \begin{macrocode}
4094 cmchar "Uncial digit 2";
4095 beginchar("2", 2u#+fig_width#, fig_height#, 0);
4096 adjust_fit(0,0);
4097 pcshiftx := u;
4098 pickup quill;
4099 % stem
4100 lft x1=pcshiftx+o; top y1=h-2thin;
4101 x2=1/2w; top y2= h+o;
4102 rt x3=w-pcshiftx-o; y3=3/4h;
4103 % foot
4104 lft x5=pcshiftx; bot y5=0;
4105 rt x6=w-pcshiftx; y6=y5;
4106 %%ductus:=true;
4107 if ductus:
4108 pickup stylus;
4109 fi
4110 draw_wave(5,6,thin); % foot
4111 draw z1..z2{right}..z3{down}..{-pdir}z5wl; % curve
4112 ductus:=false;
4113 penlabels(1,2,3,4,5,6,100);
4114 endchar; % end "2"
4115
4116 % \end{macrocode}
4117 % \end{routine}
4118 %
4119 %
4120 % \begin{routine}{3}
4121 % The digit `3'.
4122 % \begin{macrocode}
4123 cmchar "Uncial digit 3";
4124 beginchar("3", 2u#+fig_width#, fig_height#, 0);
4125 adjust_fit(0,0);
4126 pcshiftx := u;
4127 pickup quill;
4128 % x values
4129 lft x3=pcshiftx; x10=x3;
4130 rt x5=w-pcshiftx; x8=x5-3thin;
4131 x4=0.5[x3,x5];
4132 x9=0.5[x10,x8];
4133 %%lft x6=pcshiftx+3thin; x7=x6;
4134 x6=1/2[x3,x9]; x7=x6;
4135 % y values
4136 bot y3=thin; top y10=h-2thin;
4137 y6=0.5[y3,y10]; y7=y6;
4138 bot y4=-thin; top y9=h+thin;
4139 y5=0.5[y3,y6];
4140 y8=11/12[y7,y10];
4141 %%ductus:=true;
4142 if ductus:
4143 pickup stylus;
4144 fi
4145 %%draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl
4146 %%draw z7{pdir}..z8{up}..z9{left}..z10; % top bowl
4147 draw z3..z4{right}..z5{up}...{left}z6; % bottom bowl
4148 draw z7{right}..z8{up}..z9{left}..z10; % top bowl
4149 ductus:=false;
4150 penlabels(1,2,3,4,5,6,7,8,9,10,100);
4151 endchar; % end "3"
4152
4153 % \end{macrocode}
4154 % \end{routine}
4155 %
4156 % \begin{routine}{4}
4157 % The digit `4'.
4158 % \begin{macrocode}
4159 cmchar "Uncial digit 4";
4160 beginchar("4", 2u#+fig_width#, fig_height#, 0);
4161 adjust_fit(0,0);
4162 pcshiftx := u;
4163 pickup quill;
4164 % the stem
4165 x1=x2=w-pcshiftx-jut;
4166 y1=h; bot y2=0;
4167 % the crossbar
4168 lft x3=pcshiftx; y3=0.33h;
4169 rt x4=w-pcshiftx; y4=y3;
4170 %%ductus:=true;
4171 if ductus:
4172 pickup stylus;
4173 fi
4174 draw_tstem(1,2,srad); % main stem
4175 draw_wave(3,4,thin); % crossbar
4176 draw z3wl--z1; % diagonal
4177 ductus:=false;
4178 penlabels(1,2,3,4,100);
4179 endchar; % end "4"
4180
4181 % \end{macrocode}
4182 % \end{routine}
4183 %
4184 %
4185 %
4186 % \begin{routine}{5}
4187 % The digit `5'.
4188 % \begin{macrocode}
4189 cmchar "Uncial digit 5";
4190 beginchar("5", 2u#+fig_width#, fig_height#, 0);
4191 adjust_fit(0,0);
4192 pcshiftx := u;
4193 pickup quill;
4194 % for the top
4195 rt x1=w-pcshiftx; top y1=h;
4196 lft x2=pcshiftx; y2=y1;
4197 % the S curve
4198 x3=x2; y3=0.5h+thin;
4199 x4=0.5[x1,x3]; y4=0.5[y3,y5];
4200 rt x5=w-pcshiftx; y5=0.3h;
4201 x6=w/2; bot y6=0;
4202 lft x7=pcshiftx; bot y7=2thin;
4203 %%ductus:=true;
4204 if ductus:
4205 pickup stylus;
4206 fi
4207 draw_wave(2,1,thin); % top squiggle
4208 draw z3{pdir}..z5{down}..z6{left}..z7; % curve
4209 draw z2wl--z3; % vertical
4210 ductus:=false;
4211 penlabels(1,2,3,4,5,6,7,100);
4212 endchar; % end "5"
4213
4214 % \end{macrocode}
4215 % \end{routine}
4216 %
4217 % \begin{routine}{6}
4218 % The digit `6'.
4219 % \begin{macrocode}
4220 cmchar "Uncial digit 6";
4221 beginchar("6", 2u#+fig_width#, fig_height#, 0);
4222 adjust_fit(0,0);
4223 pcshiftx := u;
4224 pickup quill;
4225 rt x1=w-pcshiftx; top y1=h-2thin;
4226 x2=1/2w; top y2= h;
4227 lft x3=pcshiftx; y3=1/2h;
4228 x4=x2; bot y4=0;
4229 rt x5=w-pcshiftx; y5=1/4h;
4230 lft x6=rt x3; bot y6=y3;
4231 %%ductus:=true;
4232 if ductus:
4233 pickup stylus;
4234 fi
4235 draw z1..z2{left}..z3{down}..z4{right}..z5{up}..{-pdir}z6;
4236 ductus:=false;
4237 penlabels(1,2,3,4,5,6,100);
4238 endchar; % end "6"
4239
4240 % \end{macrocode}
4241 % \end{routine}
4242 %
4243 %
4244 % \begin{routine}{7}
4245 % The digit `7'.
4246 % \begin{macrocode}
4247 cmchar "Uncial digit 7";
4248 beginchar("7", 2u#+fig_width#, fig_height#, 0);
4249 adjust_fit(0,0);
4250 pcshiftx := u;
4251 pickup quill;
4252 % top bar
4253 lft x1=pcshiftx;
4254 rt x2=w-pcshiftx;
4255 top y1=top y2=h;
4256 % bowed leg
4257 x4=w/2; bot y4=0;
4258 x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4];
4259 %%ductus:=true;
4260 if ductus:
4261 pickup stylus;
4262 fi
4263 draw_wave(1,2,thin); % top bar
4264 draw z1wr..z3..z4;
4265 ductus:=false;
4266 penlabels(1,2,3,4,5,6,100);
4267 endchar; % end "7"
4268
4269 % \end{macrocode}
4270 % \end{routine}
4271 %
4272 % \begin{routine}{8}
4273 % The digit `8'.
4274 % \begin{macrocode}
4275 cmchar "Uncial digit 8";
4276 beginchar("8", 2u#+fig_width#, fig_height#, 0);
4277 adjust_fit(0,0);
4278 pcshiftx := u;
4279 numeric alpha; alpha:=1;
4280 pickup quill;
4281 lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h;
4282 x2=x4=w/2; top y2=h+o; bot y4=-o;
4283 x5=x2; y5=h/2+2o;
4284 lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h;
4285 %%ductus:=true;
4286 if ductus:
4287 pickup stylus;
4288 fi
4289 draw z1..z2..z3..z5..z11..z4..z13..z5..cycle;
4290 ductus:=false;
4291 penlabels(1,2,3,4,5,11,13,100);
4292 endchar; % end "8"
4293
4294 % \end{macrocode}
4295 % \end{routine}
4296 %
4297 % \begin{routine}{9}
4298 % The digit `9'.
4299 % \begin{macrocode}
4300 cmchar "Uncial digit 9";
4301 beginchar("9", 2u#+fig_width#, fig_height#, 0);
4302 adjust_fit(0,0);
4303 pcshiftx := u;
4304 pickup quill;
4305 lft x1=pcshiftx; bot y1=2thin;
4306 x2=1/2w; bot y2= 0;
4307 rt x3=w-pcshiftx; y3=1/2h;
4308 x4=x2; top y4=h;
4309 lft x5=pcshiftx; y5=3/4h;
4310 rt x6=lft x3; top y6=y3;
4311 %%ductus:=true;
4312 if ductus:
4313 pickup stylus;
4314 fi
4315 draw z1..z2{right}..z3{up}..z4{left}..z5{down}..{pdir}z6;
4316 ductus:=false;
4317 penlabels(1,2,3,4,5,6,100);
4318 endchar; % end "9"
4319
4320 % \end{macrocode}
4321 % \end{routine}
4322 %
4323 %
4324 % \begin{routine}{0}
4325 % The digit `0'.
4326 % \begin{macrocode}
4327 cmchar "Uncial digit 0";
4328 beginchar("0", 2u#+fig_width#, fig_height#, 0);
4329 adjust_fit(0,0);
4330 pcshiftx := u;
4331 y100 = h/2; x100 = pcshiftx+y100; % square center
4332 pickup quill;
4333 lft x1=pcshiftx; rt x3=w-pcshiftx; y1=y3=h/2;
4334 x2=x4=w/2; top y2=h+o; bot y4=-o;
4335 %%ductus:=true;
4336 if ductus:
4337 pickup stylus;
4338 fi
4339 draw z1..z2..z3..z4..cycle;
4340 ductus:=false;
4341 proofpcbb(100, y100, y100);
4342 penlabels(1,2,3,4,100);
4343 endchar; % end "0"
4344
4345 % \end{macrocode}
4346 % \end{routine}
4347 %
4348 %
4349 % The end of this file.
4350 % \begin{macrocode}
4351 %</dig>
4352 % \end{macrocode}
4353 %
4354 %
4355 % \section{The font definition files} \label{sec:fd}
4356 %
4357 % The font comes in normal and bold weights only.
4358 %
4359 % \begin{macrocode}
4360 %<*fdot1>
4361 \DeclareFontFamily{OT1}{imin}{}
4362 \DeclareFontShape{OT1}{imin}{m}{n}{ <-8.5> imin7 <8.5-15> imin10 <15-> imin17 }{}
4363 \DeclareFontShape{OT1}{imin}{m}{sl}{ <-> sub * imin/m/n }{}
4364 \DeclareFontShape{OT1}{imin}{m}{it}{ <-> sub * imin/m/n }{}
4365 \DeclareFontShape{OT1}{imin}{m}{sc}{ <-> sub * imin/m/n }{}
4366 \DeclareFontShape{OT1}{imin}{m}{u}{ <-> sub * imin/m/n }{}
4367 \DeclareFontShape{OT1}{imin}{bx}{n}{ <-8.5> iminb7 <8.5-15> iminb10 <15-> iminb17 }{}
4368 \DeclareFontShape{OT1}{imin}{bx}{it}{ <-> sub * imin/bx/n }{}
4369 \DeclareFontShape{OT1}{imin}{bx}{sl}{ <-> sub * imin/bx/n }{}
4370 \DeclareFontShape{OT1}{imin}{b}{n}{ <-> sub * imin/bx/n }{}
4371 %</fdot1>
4372 % \end{macrocode}
4373 %
4374 %
4375 % \begin{macrocode}
4376 %<*fdt1>
4377 \DeclareFontFamily{T1}{imin}{}
4378 \DeclareFontShape{T1}{imin}{m}{n}{ <-8.5> imin7 <8.5-15> imin10 <15-> imin17 }{}
4379 \DeclareFontShape{T1}{imin}{m}{sl}{ <-> sub * imin/m/n }{}
4380 \DeclareFontShape{T1}{imin}{m}{it}{ <-> sub * imin/m/n }{}
4381 \DeclareFontShape{T1}{imin}{m}{sc}{ <-> sub * imin/m/n }{}
4382 \DeclareFontShape{T1}{imin}{m}{u}{ <-> sub * imin/m/n }{}
4383 \DeclareFontShape{T1}{imin}{bx}{n}{ <-8.5> iminb7 <8.5-15> iminb10 <15-> iminb17 }{}
4384 \DeclareFontShape{T1}{imin}{bx}{it}{ <-> sub * imin/bx/n }{}
4385 \DeclareFontShape{T1}{imin}{bx}{sl}{ <-> sub * imin/bx/n }{}
4386 \DeclareFontShape{T1}{imin}{b}{n}{ <-> sub * imin/bx/n }{}
4387 %</fdt1>
4388 % \end{macrocode}
4389 %
4390 % \section{The package code} \label{sec:code}
4391 %
4392 % \subsection{The \Lpack{inslrmin} package}
4393 %
4394 % The \Lpack{inslrmin} package is for typesetting short pieces of text
4395 % in the \thisfont{} fonts.
4396 %
4397 % Announce the name and version of the package, which requires
4398 % \LaTeXe{}.
4399 % \begin{macrocode}
4400 %<*usc>
4401 \NeedsTeXFormat{LaTeX2e}
4402 \ProvidesPackage{inslrmin}[2002/12/30 v1.0 package for Insular Minuscule fonts]
4403 % \end{macrocode}
4404 %
4405 % \begin{macro}{\Tienc}
4406 % A macro for testing the value of |\encodingdefault|.
4407 % \begin{macrocode}
4408 \providecommand{\Tienc}{T1}
4409 % \end{macrocode}
4410 % \end{macro}
4411 %
4412 %
4413 % \begin{macro}{\iminfamily}
4414 % Selects the \thisfont{} font family in the OT1 or T1 encoding.
4415 % \begin{macrocode}
4416 \ifx\Tienc\encodingdefault
4417 \newcommand{\iminfamily}{\usefont{T1}{imin}{m}{n}}
4418 \else
4419 \newcommand{\iminfamily}{\usefont{OT1}{imin}{m}{n}}
4420 \fi
4421 % \end{macrocode}
4422 % \end{macro}
4423 %
4424 % \begin{macro}{\textimin}
4425 % Text command for the \thisfont{} font family.
4426 % \begin{macrocode}
4427 \DeclareTextFontCommand{\textimin}{\iminfamily}
4428 % \end{macrocode}
4429 % \end{macro}
4430 %
4431 % The end of this package.
4432 % \begin{macrocode}
4433 %</usc>
4434 % \end{macrocode}
4435 %
4436 % \subsection{The \Lpack{allimin} package}
4437 %
4438 % The \Lpack{allimin} package is intended for use when the entire document
4439 % will be typeset in the book-hand. This is a minimal package. Because the
4440 % book-hand should not contain arabic digits a fuller package would redefine
4441 % anything numbered in \LaTeX{} to use roman instead of arabic numbering.
4442 % Also, because of the large |\baselineskip| many other aspects of \LaTeX{}
4443 % to do with vertical positioning should also be redefined.
4444 %
4445 %
4446 % Announce the name and version of the package, which requires
4447 % \LaTeXe{}. It also uses the \Lpack{inslrmin} package.
4448 % \begin{macrocode}
4449 %<*uscall>
4450 \NeedsTeXFormat{LaTeX2e}
4451 \ProvidesPackage{allimin}[2002/12/30 v1.0 package for all Insular Minuscule fonts]
4452 \RequirePackage{inslrmin}
4453 % \end{macrocode}
4454 %
4455 % \begin{macro}{\Tienc}
4456 % A macro for testing the value of |\encodingdefault|.
4457 % \begin{macrocode}
4458 \providecommand{\Tienc}{T1}
4459 % \end{macrocode}
4460 % \end{macro}
4461 %
4462 % Redefine the default fonts to be \thisfont, which has only one family
4463 % member.
4464 % \begin{macro}{\rmdefault}
4465 % \begin{macro}{\sfdefault}
4466 % \begin{macro}{\ttdefault}
4467 % \begin{macrocode}
4468 \renewcommand{\rmdefault}{imin}
4469 \renewcommand{\sfdefault}{imin}
4470 \renewcommand{\ttdefault}{imin}
4471 % \end{macrocode}
4472 % \end{macro}
4473 % \end{macro}
4474 % \end{macro}
4475 %
4476 % The `leading' in the book-hands is a function of the |x-height|, which is
4477 % normally much
4478 % greater than for the CMR fonts. I have borrowed code from Frank Jensen's
4479 % \Lpack{beton} package~\cite{BETON} to do this. The |x-height| (in points)
4480 % for the CMR
4481 % fonts is given in Table~\ref{tab:cmrx}. Note that the CMR design sizes are
4482 % 5--10, 12, and 17.28 points. The other values given are scaled from these
4483 % figures.
4484 %
4485 % \begin{table}
4486 % \centering
4487 % \caption{The x heights of the CMR and \thisfont{} fonts} \label{tab:cmrx}
4488 % \begin{tabular}{ccc} \hline
4489 % Design & CMR & \thisfont \\
4490 % Size & X Height & X Height \\ \hline
4491 % 5 & 2.14 & 3.00 \\ ^^A CMR skip = 6pt = 2.8 times
4492 % 6 & 2.58 & 3.61 \\ ^^A CMR skip = 7pt = 2.7 times
4493 % 7 & 3.00 & 4.20 \\ ^^A CMR skip = 8pt = 2.7 times
4494 % 8 & 3.44 & 4.81 \\ ^^A CMR skip = 9.5pt = 2.8 times
4495 % 9 & 3.86 & 5.40 \\ ^^A CMR skip = 11pt = 2.8 times
4496 % 10 & 4.31 & 6.03 \\ ^^A CMR skip = 12pt = 2.8 times
4497 % 11 & 4.74 & 6.64 \\ ^^A CMR skip = 13.6pt = 2.8 times
4498 % 12 & 5.17 & 7.24 \\ ^^A CMR skip = 14.5pt = 2.8 times
4499 % 14 & 6.03 & 8.44 \\ ^^A CMR skip = 18pt = 3.0 times
4500 % 17 & 7.44 & 10.41 \\ ^^A CMR skip = 22pt = 3.0 times
4501 % 20 & 8.75 & 12.25 \\ ^^A CMR skip = 25pt = 2.9 times
4502 % 25 & 10.94 & 15.32 \\ ^^A CMR skip = 30pt = 2.7 times
4503 % \hline
4504 % \end{tabular}
4505 % \end{table}
4506 %
4507 % \begin{macro}{\imin@baselineskip@table}
4508 % A table of the normal font sizes and the corresponding baselineskip.
4509 % The distance between baselines for \thisfont{} is over twice
4510 % the |x-height|. ^^A actually 2.5 times to nearest half point
4511 %
4512 % \begin{macrocode}
4513 \newcommand{\imin@baselineskip@table}{%
4514 <\@vpt>7.5%
4515 <\@vipt>9.0%
4516 <\@viipt>10.5%
4517 <\@viiipt>12.0%
4518 <\@ixpt>13.5%
4519 <\@xpt>15.0%
4520 <\@xipt>16.5%
4521 <\@xiipt>18.0%
4522 <\@xivpt>21.0%
4523 <\@xviipt>26.0%
4524 <\@xxpt>30.5%
4525 <\@xxvpt>38.5}
4526 % \end{macrocode}
4527 % \end{macro}
4528 %
4529 % \begin{macro}{\imin@new@setfontsize}
4530 % This is a macro that replaces the |\@setfontsize| macro which is called by
4531 % the font size changing commands.
4532 % \begin{macrocode}
4533 \newcommand{\imin@new@setfontsize}[3]{%
4534 \edef\@tempa{\def\noexpand\@tempb####1<#2}%
4535 \@tempa>##2<##3\@nil{\def\imin@baselineskip@value{##2}}%
4536 \edef\@tempa{\noexpand\@tempb\imin@baselineskip@table<#2}%
4537 \@tempa><\@nil
4538 \ifx\imin@baselineskip@value\@empty
4539 \def\imin@baselineskip@value{#3}%
4540 \fi
4541 \imin@old@setfontsize{#1}{#2}\imin@baselineskip@value}
4542 % \end{macrocode}
4543 % \end{macro}
4544 %
4545 % We had better give an author a means of using The Computer Modern fonts
4546 % if necessary.
4547 %
4548 % \begin{macro}{\cmrfamily}
4549 % \begin{macro}{\cmssfamily}
4550 % \begin{macro}{\cmttfamily}
4551 % These macros select the Computer Modern Roman, Sans, and Typewriter
4552 % font families in either the T1 or OT1 encodings.
4553 % \begin{macrocode}
4554 \ifx\Tienc\encodingdefault
4555 \providecommand{\cmrfamily}{\usefont{T1}{cmr}{m}{n}}
4556 \providecommand{\cmssfamily}{\usefont{T1}{cmss}{m}{n}}
4557 \providecommand{\cmttfamily}{\usefont{T1}{cmtt}{m}{n}}
4558 \else
4559 \providecommand{\cmrfamily}{\usefont{OT1}{cmr}{m}{n}}
4560 \providecommand{\cmssfamily}{\usefont{OT1}{cmss}{m}{n}}
4561 \providecommand{\cmttfamily}{\usefont{OT1}{cmtt}{m}{n}}
4562 \fi
4563 % \end{macrocode}
4564 % \end{macro}
4565 % \end{macro}
4566 % \end{macro}
4567 %
4568 % \begin{macro}{\textcmr}
4569 % Text command for the Computer Modern Roman font family.
4570 % \begin{macrocode}
4571 \DeclareTextFontCommand{\textcmr}{\cmrfamily}
4572 % \end{macrocode}
4573 % \end{macro}
4574 %
4575 % \begin{macro}{\textcmss}
4576 % Text command for the Computer Modern Sans font family.
4577 % \begin{macrocode}
4578 \DeclareTextFontCommand{\textcmss}{\cmssfamily}
4579 % \end{macrocode}
4580 % \end{macro}
4581 %
4582 % \begin{macro}{\textcmtt}
4583 % Text command for the Computer Modern Typewriter font family.
4584 % \begin{macrocode}
4585 \DeclareTextFontCommand{\textcmtt}{\cmttfamily}
4586 % \end{macrocode}
4587 % \end{macro}
4588 %
4589 %
4590 % At the start of the document, change the |\@setfontsize| macro and call
4591 % the normal font to implement the change.
4592 % \begin{macrocode}
4593 \AtBeginDocument{%
4594 \let\imin@old@setfontsize=\@setfontsize
4595 \let\@setfontsize=\imin@new@setfontsize}
4596 \AtBeginDocument{\normalsize}
4597 % \end{macrocode}
4598 %
4599 %
4600 % The end of this package.
4601 % \begin{macrocode}
4602 %</uscall>
4603 % \end{macrocode}
4604 %
4605 %
4606 %
4607 %
4608 %
4609 % \Finale
4610 % \PrintIndex
4611 %
4612 \endinput
4613
4614 %% \CharacterTable
4615 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
4616 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
4617 %% Digits \0\1\2\3\4\5\6\7\8\9
4618 %% Exclamation \! Double quote \" Hash (number) \#
4619 %% Dollar \$ Percent \% Ampersand \&
4620 %% Acute accent \' Left paren \( Right paren \)
4621 %% Asterisk \* Plus \+ Comma \,
4622 %% Minus \- Point \. Solidus \/
4623 %% Colon \: Semicolon \; Less than \<
4624 %% Equals \= Greater than \> Question mark \?
4625 %% Commercial at \@ Left bracket \[ Backslash \\
4626 %% Right bracket \] Circumflex \^ Underscore \_
4627 %% Grave accent \` Left brace \{ Vertical bar \|
4628 %% Right brace \} Tilde \~}
4629
4630