Debian Codegraph @

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

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