Debian Codegraph @

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

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