Debian Codegraph @

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

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