Debian Codegraph @

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

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