Debian Codegraph @

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

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