Debian Codegraph @

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

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