Debian Codegraph @

texmf-dist/source/fonts/pacioli/pacioli.dtx

raw
1 % \iffalse meta-comment
2 %
3 % pacioli.dtx
4 % Copyright 1999 Peter R. Wilson
5 %
6 % This program is provided under the terms of the
7 % LaTeX Project Public License distributed from CTAN
8 % archives in directory macros/latex/base/lppl.txt.
9 %
10 % Author: Peter Wilson (CUA and NIST) (now at: [email protected])
11 %
12 %
13 %<*driver>
14 \documentclass{ltxdoc}
15 \EnableCrossrefs
16 \CodelineIndex
17 \setcounter{StandardModuleDepth}{1}
18 \begin{document}
19 \DocInput{pacioli.dtx}
20 \end{document}
21 %</driver>
22 %
23 % \fi
24 %
25 % \CheckSum{37}
26 %
27 % \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
28 % \DoNotIndex{\@centercr,\@cite}
29 % \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
30 % \DoNotIndex{\@input,\@ixpt,\@m}
31 % \DoNotIndex{\@minus,\@mkboth,\@ne,\@nil,\@nomath,\@plus,\@set@topoint}
32 % \DoNotIndex{\@tempboxa,\@tempcnta,\@tempdima,\@tempdimb}
33 % \DoNotIndex{\@tempswafalse,\@tempswatrue,\@viipt,\@viiipt,\@vipt}
34 % \DoNotIndex{\@vpt,\@warning,\@xiipt,\@xipt,\@xivpt,\@xpt,\@xviipt}
35 % \DoNotIndex{\@xxpt,\@xxvpt,\\,\ ,\addpenalty,\addtolength,\addvspace}
36 % \DoNotIndex{\advance,\Alph,\alph}
37 % \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
38 % \DoNotIndex{\bullet}
39 % \DoNotIndex{\cdot,\cite,\CodelineIndex,\cr,\day,\DeclareOption}
40 % \DoNotIndex{\def,\DisableCrossrefs,\divide,\DocInput,\documentclass}
41 % \DoNotIndex{\DoNotIndex,\egroup,\ifdim,\else,\fi,\em,\endtrivlist}
42 % \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
43 % \DoNotIndex{\endlist,\everycr,\everypar,\ExecuteOptions,\expandafter}
44 % \DoNotIndex{\fbox}
45 % \DoNotIndex{\filedate,\filename,\fileversion,\fontsize,\framebox,\gdef}
46 % \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
47 % \DoNotIndex{\hsize,\hskip,\hspace,\hss,\if@tempswa,\ifcase,\or,\fi,\fi}
48 % \DoNotIndex{\ifhmode,\ifvmode,\ifnum,\iftrue,\ifx,\fi,\fi,\fi,\fi,\fi}
49 % \DoNotIndex{\input}
50 % \DoNotIndex{\jobname,\kern,\leavevmode,\let,\leftmark}
51 % \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark,\markboth,\markright}
52 % \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
53 % \DoNotIndex{\NeedsTeXFormat,\newdimen}
54 % \DoNotIndex{\newlength,\newpage,\nobreak,\noindent,\null,\number}
55 % \DoNotIndex{\numberline,\OldMakeindex,\OnlyDescription,\p@}
56 % \DoNotIndex{\pagestyle,\par,\paragraph,\paragraphmark,\parfillskip}
57 % \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
58 % \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
59 % \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font}
60 % \DoNotIndex{\rightmargin,\rightmark,\rightskip,\rlap,\rmfamily,\roman}
61 % \DoNotIndex{\roman,\secdef,\selectfont,\setbox,\setcounter,\setlength}
62 % \DoNotIndex{\settowidth,\sfcode,\skip,\sloppy,\slshape,\space}
63 % \DoNotIndex{\symbol,\the,\trivlist,\typeout,\tw@,\undefined,\uppercase}
64 % \DoNotIndex{\usecounter,\usefont,\usepackage,\vfil,\vfill,\viiipt}
65 % \DoNotIndex{\viipt,\vipt,\vskip,\vspace}
66 % \DoNotIndex{\wd,\xiipt,\year,\z@}
67 %
68 % \changes{v1.0}{1999/03/14}{First public release}
69 % \changes{v1.0a}{2001/01/02}{Fixed missing * in .fd files}
70 %
71 % ^^A \def\fileversion{v1.0}
72 % ^^A \def\filedate{1999/03/14}
73 % \def\fileversion{v1.0a}
74 % \def\filedate{2001/01/02}
75 % \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
76 % \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
77 % \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
78 % \newcommand*{\Lcount}[1]{\textsl {\small#1}} ^^A typeset a counter
79 % \newcommand*{\pstyle}[1]{\textsl {#1}} ^^A typeset a pagestyle
80 % \newcommand*{\Lenv}[1]{\texttt {#1}} ^^A typeset an environment
81 %
82 % \title{The \Lpack{Pacioli} fonts\thanks{This
83 % file has version number \fileversion, last revised
84 % \filedate.}}
85 %
86 % \author{%
87 % Peter Wilson\\
88 % Catholic University of America \\
89 % Now at {\tt [email protected]}
90 % }
91 % \date{\filedate}
92 % \maketitle
93 % \begin{abstract}
94 % The \Lpack{pacioli} package provides a set of uppercase fonts
95 % designed by Fra Luca de Pacioli in 1497.
96 % \end{abstract}
97 % \tableofcontents
98 %
99 % \StopEventually{}
100 %
101 %
102 %
103 % \section{Introduction}
104 %
105 % Around the beginning of the 16th century several authors published designs
106 % for uppercase characters. The more well known among these were Albrecht
107 % D\"{u}rer who wrote \textit{On the Just Shaping of Letters} which was
108 % published in Nuremberg in 1525, and Geofroy
109 % Tory who wrote \textit{Champ Fleury} which was published in Paris in 1529.
110 % Fra Luca Bartolomeo de Pacioli preceeded both of these by developing his
111 % recipe for uppercase characters in 1497 and which was published in
112 % \textit{De Divina Proportione} at Venice in 1509.
113 % Stanley Morison~\cite{MORISON94} provides
114 % a more accessible source for Pacioli's characters.
115 %
116 % This manual is typeset according to the conventions of the
117 % \LaTeX{} \textsc{docstrip} utility which enables the automatic
118 % extraction of the \LaTeX{} macro source files~\cite{GOOSSENS94}.
119 %
120 % Section~\ref{sec:usc} describes the usage of the package.
121 % Commented code for the fonts is in Sections~\ref{sec:mf} and~\ref{sec:fd} and
122 % source code for the package is in Section~\ref{sec:code}.
123 %
124 %
125 % \section{The \Lpack{pacioli} package} \label{sec:usc}
126 %
127 % Pacioli gave instructions for most of the uppercase letters in the alphabet,
128 % except for J, U, W and Z. All the designs were based on a square within which
129 % the letters were fitted. The width of the thickest limbs are 1/9 of the
130 % size of the square. Thinner limbs were normally half the width of the thick
131 % limbs and occasionaly, as in the cross-bar of the A, were 1/3 of the width.
132 %
133 % Albrecht D\"{u}rer's characters were similar to Pacioli's, and I have used
134 % a modified version of Alan Hoenig's rendition of the D\"{u}rer font
135 % for the missing characters.\footnote{Alan Hoenig's D\"{u}rer font is
136 % available from CTAN in the \texttt{duerer} subdirectory.}
137 %
138 % I have also added modified versions of Knuth's Computer Modern punctuation
139 % characters so that, perhaps, the Pacioli font could be used as a titling font.
140 %
141 % Pacioli's font as provided here consists of the uppercase letters,
142 % the punctuation marks !.,;:`'?,
143 % the hyphen together with the en- and em-dash,
144 % and the analphabetic characters ()[]\&.
145 % All the chacters are accessed by typing them as you usually do in \LaTeX.
146 %
147 % Pacioli's fonts are designed using ruler and compass, but `real' font
148 % design is more subtle than this. Not only do the characters have to be
149 % well-formed and consistent, but they must also appear to be consistent.
150 % Because of optical illusions, certain characters, like a C or an O, may look
151 % smaller than they actually are when used in conjunction with other characters,
152 % like an A or an M. Therefore the Cs and Os are often enlarged slightly in a
153 % vertical direction. I have made these optical adjustments to the characters
154 % obtained when using uppercase input. Alternative non-adjusted characters
155 % are also provided which can be accessed by inputting lowercase characters.
156 % These are the C, G, O and Q characters; typing c, g, o or q will give the
157 % non-adjusted uppercase versions.
158 %
159 % The Pacioli font, which I have called |cpc| (for Computer PaCioli),
160 % is provided in an upright and a slanted version only.
161 %
162 % \DescribeMacro{\cpcfamily}
163 % This \Lpack{pacioli} package command will switch any following text into
164 % the Pacioli font family.
165 %
166 % \DescribeMacro{\textcpc}
167 % The \Lpack{pacioli} package command |\textcpc{|\meta{text}|}| will
168 % typeset its \meta{text} argument using the Pacioli font family.
169 %
170 % \section{The Metafont code} \label{sec:mf}
171 %
172 % \subsection{The parameter file}
173 %
174 % We deal with the two parameter files first, and start by announcing
175 % what they are for.
176 % \begin{macrocode}
177 %<*up|sl>
178 %<up> %%% CPCR10.MF Computer Pacioli Roman at 10 point design size.
179 %<sl> %%% CPCSL10.MF Computer Pacioli Slanted at 10 point design size.
180 %
181 % \end{macrocode}
182 % Parameters from CMR10.MF are used as much as possible. We also
183 % make sure that \Lpack{cmbase} is loaded as well as plain Metafont.
184 % \begin{macrocode}
185 if unknown cmbase: input cmbase fi
186 %
187 %<up>font_identifier:="CPCR"; font_size 10pt#;
188 %<sl>font_identifier:="CPCSL"; font_size 10pt#;
189 %
190 % \end{macrocode}
191 %
192 % The majority of the parameters and values are the same for both
193 % fonts.
194 %
195 % \begin{macro}{u}
196 % \begin{macro}{hstretch}
197 % \begin{macro}{vstretch}
198 % \begin{macro}{width-adj}
199 % \begin{macro}{serif-fit}
200 % \begin{macro}{cap-serif-fit}
201 % \begin{macro}{letter-fit}
202 % \begin{macrocode}
203 u#:=20/36pt#; % unit width
204 hstretch:=1; % horizontal stretching factors; in lieu of u
205 vstretch:=1; % vertical stretching factor
206 width_adj#:=0pt#; % width adjustment for certain characters
207 serif_fit#:=0pt#; % extra sidebar near lowercase serifs
208 cap_serif_fit#:=5/36pt#; % extra sidebar near uppercase serifs
209 letter_fit#:=0pt#; % extra space added to all sidebars
210 % \end{macrocode}
211 % \end{macro}
212 % \end{macro}
213 % \end{macro}
214 % \end{macro}
215 % \end{macro}
216 % \end{macro}
217 % \end{macro}
218 %
219 % \begin{macro}{body-height}
220 % \begin{macro}{asc-height}
221 % \begin{macro}{cap-height}
222 % \begin{macro}{fig-height}
223 % \begin{macro}{x-height}
224 % \begin{macro}{math-axis}
225 % \begin{macro}{bar-height}
226 % \begin{macro}{comma-depth}
227 % \begin{macro}{desc-depth}
228 % \begin{macro}{half-height}
229 % \begin{macrocode}
230 body_height#:=270/36pt#; % height of tallest characters
231 asc_height#:=250/36pt#; % height of lowercase ascenders
232 cap_height#:=246/36pt#; % height of caps
233 fig_height#:=232/36pt#; % height of numerals
234 x_height#:=155/36pt#; % height of lowercase without ascenders
235 math_axis#:=90/36pt#; % axis of symmetry for math symbols
236 bar_height#:=87/36pt#; % height of crossbar in lowercase e
237 comma_depth#:=70/36pt#; % depth of comma below baseline
238 desc_depth#:=70/36pt#; % depth of lowercase descenders
239 half_height#:=1/2cap_height#; % half the height of caps
240 %
241 % \end{macrocode}
242 % \end{macro}
243 % \end{macro}
244 % \end{macro}
245 % \end{macro}
246 % \end{macro}
247 % \end{macro}
248 % \end{macro}
249 % \end{macro}
250 % \end{macro}
251 % \end{macro}
252 %
253 % \begin{macro}{side}
254 % \begin{macro}{thickfudge}
255 % \begin{macro}{mediumfudge}
256 % \begin{macro}{thinfudge}
257 % \begin{macro}{thick}
258 % \begin{macro}{medium}
259 % \begin{macro}{thin}
260 % \begin{macrocode}
261 side#:=cap_height#; % Height and width of the square
262 thickfudge:=1/9; mediumfudge:=1/2; thinfudge:=1/3;
263 thick#:=thickfudge*side#; % thickness of all thick limbs in Roman font
264 medium#:=mediumfudge*thick#; % width of medium limbs
265 thin#:=thinfudge*thick#; % thinness of all thin limbs
266 %
267 % \end{macrocode}
268 % \end{macro}
269 % \end{macro}
270 % \end{macro}
271 % \end{macro}
272 % \end{macro}
273 % \end{macro}
274 % \end{macro}
275 %
276 % \begin{macro}{eta}
277 % \begin{macro}{serif-darkness}
278 % \begin{macro}{crisp}
279 % \begin{macro}{tiny}
280 % \begin{macro}{fine}
281 % \begin{macro}{rule-thickness}
282 % \begin{macrocode}
283 eta:=2-sqrt2; % darkness for serifs; $\eta \approx 0.58$
284 serif_darkness:=eta;
285 crisp#:=0pt#; % diameter of serif corners
286 tiny#:=0pt#; % diameter of rounded corners
287 fine#:=7/36pt#; % diameter of sharply rounded corners
288 rule_thickness#:=.4pt#; % thickness of lines in math symbols
289 %
290 % \end{macrocode}
291 % \end{macro}
292 % \end{macro}
293 % \end{macro}
294 % \end{macro}
295 % \end{macro}
296 % \end{macro}
297 %
298 % \begin{macro}{cap-stem}
299 % \begin{macro}{stem}
300 % \begin{macro}{dish}
301 % \begin{macro}{bracket}
302 % \begin{macro}{jut}
303 % \begin{macro}{cap-jut}
304 % \begin{macro}{beak-jut}
305 % \begin{macro}{slab}
306 % \begin{macro}{dslab}
307 % \begin{macrocode}
308 cap_stem#:=thick#; % thickness of majuscule stems
309 stem#:=thick#; % thickness of minuscule stems
310 dish#:=1/36pt#; % amount erased at top or bottom of serifs
311 bracket#:=thick#; % vertical distance from serif base to tangent
312 jut#:=thick#; % protrusion of lowercase serifs
313 cap_jut#:=2/3thick#; % protrusion of uppercase serifs for I
314 beak_jut#:=10/36pt#; % horizontal protrusion of beak serifs
315 slab#:=eps*1pt#; % serif and arm thickness
316 dslab#=0; %slab value used in Pacioli fonts
317 %
318 % \end{macrocode}
319 % \end{macro}
320 % \end{macro}
321 % \end{macro}
322 % \end{macro}
323 % \end{macro}
324 % \end{macro}
325 % \end{macro}
326 % \end{macro}
327 % \end{macro}
328 %
329 % \begin{macro}{Hrad}
330 % \begin{macro}{Lrad}
331 % \begin{macro}{lrad}
332 % \begin{macro}{srad}
333 % \begin{macro}{trad}
334 % Pacioli uses several different radii for serifs, with |cap_jut| being
335 % normal.
336 % \begin{macrocode}
337 Hrad#:=2thick#; % Huge
338 Lrad#:=3/2thick#; % Large
339 lrad#:=thick#; % large
340 srad#:=1/2thick#; % small
341 trad#:=3/8thick#; % tiny
342 %
343 % \end{macrocode}
344 % \end{macro}
345 % \end{macro}
346 % \end{macro}
347 % \end{macro}
348 % \end{macro}
349 %
350 % \begin{macro}{hair}
351 % \begin{macro}{vair}
352 % |hair| is the lowercase hairline breadth, and |vair| is the vertical
353 % diameter of hairlines.
354 % \begin{macrocode}
355 hair#:=vair#:=thin#;
356 %
357 % \end{macrocode}
358 % \end{macro}
359 % \end{macro}
360 %
361 % \begin{macro}{o}
362 % \begin{macro}{apex-o}
363 % \begin{macro}{apex-corr}
364 % \begin{macrocode}
365 o#:=8/36pt#; % amount of overshoot for curves
366 apex_o#:=thin#; % amount of overshoot for diagonal junctions
367 apex_corr#=0pt#; % fine tuning of overshoot
368 %
369 % \end{macrocode}
370 % \end{macro}
371 % \end{macro}
372 % \end{macro}
373 %
374 % \begin{macro}{slant}
375 % |slant| is the amount the font slopes to the right. It is different
376 % for the two fonts.
377 % \begin{macrocode}
378 %<up>slant:=0; % tilt ratio $(\Delta x/\Delta y)$
379 %<sl>slant:=1/6; % tilt ratio $(\Delta x/\Delta y)$
380 % \end{macrocode}
381 % \end{macro}
382 %
383 % \begin{macro}{fudge}
384 % \begin{macro}{superness}
385 % \begin{macro}{superpull}
386 % \begin{macro}{beak-darkness}
387 % \begin{macrocode}
388 %
389 fudge:=1; % factor applied to weights of heavy characters
390 superness:=1/sqrt2; % parameter for superellipses
391 superpull:=0; % extra openness inside bowls
392 beak_darkness:=11/30; % fraction of triangle inside beak serifs
393 %
394 % \end{macrocode}
395 % \end{macro}
396 % \end{macro}
397 % \end{macro}
398 % \end{macro}
399 %
400 % \begin{macro}{serifs}
401 % \begin{macro}{monospace}
402 % We are generating a seriffed, variable-width font.
403 % \begin{macrocode}
404 serifs:=true; % should serifs and bulbs be attached?
405 monospace:=false; % should all characters have the same width?
406 %
407 % \end{macrocode}
408 % \end{macro}
409 % \end{macro}
410 %
411 % \begin{macro}{dot-size}
412 % \begin{macro}{square-dots}
413 % \begin{macro}{hefty}
414 % \begin{macro}{ligs}
415 % These parameters are required for the punctation glyphs.
416 % \begin{macrocode}
417 dot_size#:=38/36pt#; % size of dots
418 square_dots:=false; % should dots be square?
419 hefty:=false; % should we try hard not to be overweight?
420 ligs:=2; % level of ligatures to be included
421
422 % \end{macrocode}
423 % \end{macro}
424 % \end{macro}
425 % \end{macro}
426 % \end{macro}
427 %
428 % \begin{macro}{flare}
429 % \begin{macro}{stem-corr}
430 % \begin{macro}{curve}
431 % These parameters are required for the ampersand and question mark.
432 % \begin{macrocode}
433 flare#:=33/36pt#; % diameter of bulbs or breadth of terminals
434 stem_corr#:=1/36pt#; % small refinement of stem breadth
435 curve#:=30/36pt#; % lowercase curve breadth
436
437 % \end{macrocode}
438 % \end{macro}
439 % \end{macro}
440 % \end{macro}
441 %
442 % \begin{macro}{whole-font}
443 % We are not generating a complete font.
444 % \begin{macrocode}
445 boolean whole_font; % try generating a complete font?
446 whole_font:=false;
447
448 % \end{macrocode}
449 % \end{macro}
450 %
451 % Finally, call the driver file for the Pacioli font.
452 % \begin{macrocode}
453 generate cpctitle %% switch to the driver file---Pacioli title
454
455 %</up|sl>
456 % \end{macrocode}
457 %
458 %
459 % \subsection{The driver file}
460 %
461 % To a large extent the driver file is based on Alan Hoenig's
462 % \Lpack{dtitle.mf}.
463 %
464 %
465 % \begin{macrocode}
466 %<*mfd>
467 % This is CPCTITLE.MF, adapted from Alan Hoenig's dtitle.mf
468 % This makes a short font.
469 % This file also contains special macros universally needed in the
470 % Pacioli font but either not in the cmbase.mf file or
471 % modifications of this.
472 %
473 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
474 %% MACRO SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%
475 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
476 %
477 % \end{macrocode}
478 %
479 % \begin{macro}{makebox}
480 % This is a new version of the \Lpack{cmbase.mf} |makebox| macro.
481 % Essentially, as we are only generating an uppercase font, we don't
482 % need all the horizontals for the lowercase characters.
483 %
484 % \begin{macrocode}
485 % A new version of cmbase.mf makebox macro
486 def makebox(text rule) =
487 for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth:
488 rule((l,y)t_,(r,y)t_); endfor % horizontals
489 for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals
490 for x=u*(1+floor(1/u)) step u until r-1:
491 rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals
492 if charic<>0:
493 rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction
494 enddef;
495
496 % \end{macrocode}
497 % \end{macro}
498 %
499 % \begin{macro}{proofpcbb}
500 % The macro |proofpcbb(S, xoff, yoff)| draws crosses at the corners of Pacioli's
501 % square, and at the bottom and top midpoints, where the point |zS| is at
502 % position |(xoff,yoff)| in the square.
503 % \begin{macrocode}
504
505 % A macro to delineate Pacioli's bounding square in proof mode.
506 % Point z$ is at (xoff,yoff) in the bounding square.
507 def proofpcbb(suffix $)(expr xoff, yoff) =
508 if proofing > 0:
509 x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner
510 z$br = (x$bl+cap_height, y$bl); % BRHC
511 z$tr = (x$bl+cap_height, y$bl+cap_height); % TRHC
512 z$tl = (x$bl, y$bl+cap_height); % TLHC
513 z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points
514 pair hc, vc;
515 hc = (2u,0); vc = (0,2u);
516 pickup pensquare scaled 2;
517 for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc:
518 draw s-hc--s+hc;
519 draw s-vc--s+vc;
520 endfor
521 fi
522 enddef;
523
524 % \end{macrocode}
525 % \end{macro}
526 %
527 % \begin{macro}{cm-arm}
528 % \begin{macro}{arm}
529 % Hoenig's modification to Knuth's |arm| macro.
530 % \begin{macrocode}
531
532 let cm_arm=arm;
533
534 vardef arm(suffix $,$$,@)(expr darkness, armjut) = % arm from |z$| to |z$$|
535 numeric vjut_; vjut_= abs(bot y$l-bot y$$);
536 x@0=good.x(x$$r-armjut); y@0=y$r;
537 if serifs: y@1=y$l; z@1=z$$l+whatever*(z$$r-z@0);
538 if x$$>=x$: x@2=x@1 - vjut_; else: x@2=x@1+vjut_; fi y@2=y$l;
539 filldraw z$$l{z@1-z$$l}...darkness[z@1,.5[z@2,z$$l]]{z@2-z$$l}...
540 z@2if x$$>=x$: {left} else: {right} fi
541 ---z$l--z$r--z@0--z$$r..cycle; % arm and beak
542 else: filldraw z$l--z$r--z@0--z$$r--cycle; fi % sans-serif arm
543 penlabels(@0,@1,@2); enddef;
544
545 % \end{macrocode}
546 % \end{macro}
547 % \end{macro}
548 %
549 % \begin{macro}{foot}
550 % This is a modified version of Hoenig's |foot| macro to draw the
551 % bottom leg of the E and L characters.
552 % \begin{macrocode}
553
554 vardef foot(suffix $, $$, @)(expr darkness, armjut) = % curved beak on E and L
555 numeric vjut_; vjut_= abs(bot y$-bot y$$);
556 x@0=good.x(x$$r-armjut); y@0=y$r;
557 if serifs:
558 y@1=y$l; z@1=z$$l+whatever*(z$$r-z@0);
559 x@2=x@1-vjut_; y@2=y$l;
560 filldraw z$$l{z@1-z$$l}...darkness[z@1,.5[z@2,z$$l] ]...z@2
561 ---z$l--z$r--z@0--z$$r--cycle; % arm and beak
562 else:
563 filldraw z$l--z$r--(x$$r,y$r)--(x$$r,y$l)--cycle;
564 fi
565 penlabels(@0,@1,@2); enddef;
566
567 % \end{macrocode}
568 % \end{macro}
569 %
570 % \begin{macro}{pulled-super-arc}
571 % \begin{macro}{pulled-arc}
572 % Hoenig's rewrite of Knuth's macros.
573 % \begin{macrocode}
574
575 vardef pulled_super_arc.l(suffix $, $$)(expr darkness)=
576 pair corner;
577 if y$=y$r: corner=(x$l, y$$l);
578 else: corner=(x$$l,y$l); fi
579 z$l{corner-z$l}...(darkness)[corner, .5[z$l, z$$l]]{z$$l-z$l}
580 ...{z$$l-corner}z$$l enddef;
581
582 vardef pulled_super_arc.r(suffix $, $$)(expr darkness)=
583 pair corner;
584 if y$=y$r: corner=(x$r,y$$r);
585 else: corner=(x$$r, y$r); fi
586 z$r{corner-z$r}...(darkness)[corner, .5[z$r, z$$r]]{z$$r-z$r}
587 ...z$$r{z$$r-corner} enddef;
588
589 vardef pulled_arc@#(suffix $, $$)=
590 pulled_super_arc@#($,$$)(eta) enddef;
591
592 % \end{macrocode}
593 % \end{macro}
594 % \end{macro}
595 %
596 % \begin{macro}{cm-font-setup}
597 % \begin{macro}{slim-font-setup}
598 % Hoenig's font set up.
599 % \begin{macrocode}
600
601 let cm_font_setup=font_setup; % Knuth's original font_setup
602
603 def slim_font_setup = % trimmed font_setup for use with Pacioli caps only
604 if monospace: let adjust_fit=mono_adjust_fit;
605 def mfudged=fudged enddef;
606 mono_charic#:=body_height#*slant;
607 if mono_charic#<0: mono_charic#:=0; fi
608 mono_charwd#:=9u#; define_whole_pixels(mono_charwd);
609 else: let adjust_fit=normal_adjust_fit;
610 def mfudged= enddef; fi
611 define_pixels(u,width_adj,serif_fit,cap_serif_fit,jut,cap_jut,bar_height,
612 dish,bracket,beak_jut,apex_o,apex_corr);
613 define_whole_pixels(letter_fit,fine,crisp,tiny);
614 define_whole_vertical_pixels(body_height,asc_height,
615 cap_height,x_height,comma_depth,desc_depth);
616 define_whole_blacker_pixels(hair,stem,cap_stem);
617 define_whole_vertical_blacker_pixels(vair,dslab,slab);
618 if slab<eps: slab:=eps fi;
619 define_corrected_pixels(o);
620 forsuffixes $=hair,stem,cap_stem:
621 fudged$.#:=fudge*$.#; fudged$:=hround(fudged$.#*hppp+blacker);
622 forever: exitif fudged$>.9fudge*$; fudged$:=fudged$+1; endfor endfor
623 rule_thickness:=ceiling(rule_thickness#*hppp);
624 heavy_rule_thickness:=ceiling(3rule_thickness#*hppp);
625 oo:=vround(.5o#*hppp*o_correction)+eps;
626 apex_oo:=vround(.5apex_o#*hppp*o_correction)+eps;
627 lowres_fix(stem) 1.3;
628 ess:=(ess#/stem#)*stem; cap_ess:=(cap_ess#/cap_stem#)*cap_stem;
629 dw:=(curve#-stem#)*hppp; bold:=curve#*hppp+blacker;
630 dh#:=.6designsize;
631 more_super:=max(superness,sqrt .77superness);
632 hein_super:=max(superness,sqrt .81225258superness); % that's $2^{-.3}$
633 clear_pen_memory;
634 if fine=0: fine:=1; fi
635 forsuffixes $=fine,crisp,tiny:
636 %%% fine $ %%%% temporary formatting convention for MFT
637 if $>fudged.hair: $:=fudged.hair; fi
638 $.breadth:=$;
639 pickup if $=0: nullpen else: pencircle scaled $; $:=$-eps fi;
640 $.nib:=savepen; breadth_[$.nib]:=$;
641 forsuffixes $$=lft,rt,top,bot: shiftdef($.$$,$$ 0); endfor endfor
642 %%% @ $ %%%% restore ordinary formatting for $
643 min_Vround:=max(fine.breadth,crisp.breadth,tiny.breadth);
644 if min_Vround<vround min_Vround: min_Vround:=vround min_Vround; fi
645 pickup pencircle scaled rule_thickness; rule.nib:=savepen;
646 currenttransform:=identity slanted slant
647 yscaled aspect_ratio scaled granularity;
648 if currenttransform=identity: let t_=relax
649 else: def t_ = transformed currenttransform enddef fi;
650 numeric paren_depth#; .5[body_height#,-paren_depth#]=math_axis#;
651 numeric asc_depth#; .5[asc_height#,-asc_depth#]=math_axis#;
652 body_depth:=desc_depth+body_height-asc_height;
653 shrink_fit:=1+hround(2letter_fit#*hppp)-2letter_fit;
654 if not string mode: if mode<=smoke: shrink_fit:=0; fi fi
655 enddef;
656
657 % \end{macrocode}
658 % \end{macro}
659 % \end{macro}
660 %
661 % \begin{macro}{pacioli-font-setup}
662 % This macro contains additional set up for the Pacioli fonts.
663 % \begin{macrocode}
664
665 def pacioli_font_setup= % contains special stuff for Pacioli fonts
666 define_pixels(side,thick,thin,medium,half_height);
667 define_pixels(Hrad,Lrad,lrad,srad,trad);
668 define_pixels(dot_size,math_axis,flare,stem_corr,curve);
669 if not known dslab#: dslab=eps; fi
670 enddef;
671
672 % \end{macrocode}
673 % \end{macro}
674 %
675 %
676 % \begin{macrocode}
677
678 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
679 %% END OF MACROS %%%%%%%%%%%%%%%%%%%%%%%%%%
680 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
681
682 % \end{macrocode}
683 %
684 % Set the mode and font setup.
685 % \begin{macrocode}
686
687 font_coding_scheme:="ASCII caps and punctuation";
688
689 mode_setup;
690
691 pacioli_font_setup;
692 if whole_font: font_setup; %slab:=eps;
693 define_whole_vertical_blacker_pixels(dslab,slab);
694 else: slim_font_setup; fi
695
696 % \end{macrocode}
697 %
698 %
699 % We generate Pacioli's uppercase letters, together with (matching)
700 % Computer Modern Roman punctuation and some analphabetics.
701 % \begin{macrocode}
702
703 input cpcromanu; % Pacioli upper case (majuscules)
704 input cpcpunct; % punctuation
705 input cpclig; % the several dashes
706 input cpcromanp % ampersand and ?mark
707
708 % \end{macrocode}
709 %
710 % Finally, do the uppercase ligtable.
711 %
712 % \begin{macrocode}
713
714 font_slant slant; font_x_height x_height#;
715 if monospace: font_normal_space 9u#; % no stretching or shrinking
716 font_quad 18u#;
717 font_extra_space 9u#;
718 else: font_normal_space 6u#+2letter_fit#;
719 font_normal_stretch 3u#; font_normal_shrink 2u#;
720 font_quad 18u#+4letter_fit#;
721 font_extra_space 2u#;
722 k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning
723 ligtable "P": "T": "Y": "A" kern kk#;
724 ligtable "F": "V": "W": "A" kern if serifs: kkk# else: kk#fi,
725 "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#;
726 ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#,
727 "V" kern k#, "Y" kern k#;
728 ligtable "A": if serifs: "R": fi
729 "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#,
730 "L": "T" kern kk#, "Y" kern kkk#, "V" kern kk#, "W" kern kkk#;
731 ligtable "I": "I" kern -k#; fi % Richard III
732
733 bye.
734
735 %</mfd>
736 % \end{macrocode}
737 %
738 % \subsection{The majuscule code}
739 %
740 % The following code is based on Alan Hoenig's code for the D\"{u}rer
741 % characters. The geometry, of course, is different for Pacioli's characters.
742 %
743 % \begin{macrocode}
744 %<*maj>
745 % CPCROMANU.MF Program files for formal Computer Pacioli fonts.
746 % Based on Alan Hoenig's dromanu.mf for Durer fonts
747
748 def checkthin=
749 if thin-currentbreadth<eps: thin:=currentbreadth+eps; fi;
750 if thin-currentbreadth<eps: thin:=currentbreadth+eps; fi enddef;
751
752 numeric P_width#; P_width#=cap_jut#+3thick#+1/4side#-thin#;
753 define_pixels(P_width);
754
755 pair xeps, yeps; xeps=(eps,0); yeps=(0,eps);
756 numeric tail_corr; tail_corr=1/8;
757 numeric cap_jut_factor; cap_jut_factor=8/7;
758
759 numeric pcshiftx#; % x value of LHS of Pacioli box wrt origin of char box
760 define_pixels(pcshiftx);
761
762 % \end{macrocode}
763 %
764 % \begin{macro}{A}
765 % The letter A. The right and left legs are |thick| and |medium|
766 % respectively, while the cross-bar is |thin|. With serifs, it just fits
767 % inside the square. The apex is slightly extended, then an arc is removed.
768 % \begin{macrocode}
769
770 cmchar "Pacioli's letter A";
771 beginchar("A", 2u#+side#, cap_height#, 0);
772 adjust_fit(cap_serif_fit#, cap_serif_fit#);
773 pcshiftx := u;
774 top y3= top y2=h + 2cap_jut;
775 % for left leg
776 numeric alpha[]; alpha1=(h++(0.5side - cap_jut - 0.5thin))/(side);
777 penpos1(alpha1*medium,0); penpos2(alpha1*medium,0);
778 % and for the right leg
779 alpha2=(h++(0.5side-0.5thick))/(side);
780 penpos3(alpha2*thick,0); penpos4(alpha2*thick,0);
781 lft x1l=cap_jut_factor*lrad+.5u; rt x4r=pcshiftx + side;
782 bot y1=bot y4=0 if monospace: +1/2 crisp fi;
783 x3r=x2l = 0.5side + pcshiftx;
784 z0=whatever[z1r,z2r]=whatever[z3l,z4l];
785 fill z0--diag_end(0,4l,1,1,4r,3r)--z3r..z2l--diag_end(2l,1l,1,1,1r,0)
786 --z0..cycle; % diagonals
787 top y5r=top y6r=hround(h/2); top y5r-bot y5l=top y6r-bot y6l=thin;
788 penpos5(whatever, angle(z2-z1)); penpos6(whatever, angle(z3-z4));
789 z5=whatever[z1,z2]; z6=whatever[z3,z4];
790 penstroke z5e--z6e; % bar line
791 pickup tiny.nib;
792 numeric top_bar; top_bar=top y5r-bot y6l;
793 if monospace: pickup pencircle scaled 0pt;
794 pos11(top_bar,90); pos12(top_bar,90);
795 top y11r=top y12r=h; w/2=.5[x11,x12]; x12-x11=apex_corr+2cap_jut;
796 fill z11l--z12l{right}..tension atleast.95..{left}z12r--z11r{left}..
797 tension atleast.95..{right}cycle;
798 penlabels(11,12); fi
799 if serifs: bracket:=10/7 bracket; cap_jut:=cap_jut_factor*cap_jut;
800 pickup tiny.nib; numeric jut_factor;
801 if monospace: jut_factor:=1; else: jut_factor:=3/4; fi
802 serif(1,2,a,.8serif_darkness,-cap_jut);serif(4,3,d,.8serif_darkness, cap_jut);
803 bracket:=jut_factor*bracket; if monospace: jut_factor:=.6; fi
804 serif(1,2,b,7/8 serif_darkness,jut_factor*cap_jut);
805 serif(4,3,c,7/8 serif_darkness,-jut_factor*cap_jut);
806 fi
807 % remove the apex
808 x20 = x2l - 0.5lrad; y20 = side+lrad;
809 erase filldraw fullcircle scaled 2lrad shifted (x20,y20);
810 proofpcbb(1, lrad+0.5medium, 0);
811 penlabels(0,1,2,3,4,5,6,20); endchar;
812
813 % \end{macrocode}
814 % \end{macro}
815 %
816 % \begin{macro}{B}
817 % The letter B.
818 % \begin{macrocode}
819
820 cmchar "Pacioli's letter B";
821 beginchar("B",u#+cap_jut#+0.64side#, cap_height#, 0);
822 adjust_fit(cap_serif_fit#,0); pickup tiny.nib;
823 pcshiftx := 0.5u;
824 pos1(thick,0); pos2(thick,0); lft x1l=lft x2l=pcshiftx+cap_jut;
825 bot y2=0; top y1=h; filldraw stroke z1e--z2e; % vertical stem
826 pos3(thin,-90); pos5(thick,0); pos7(medium,90);
827 z3r=z2; y4l=y3l; x4l=x3l+thick; y4r=y3r; x4r=x4l+thick-1/2thin; z4=.5[z4l,z4r];
828 y7=h/2; x7=x1; y6l=y7l; x6l=x4l; top y6r-bot y6l=medium; x6r=x4r;
829 z6=.5[z6r,z6l];
830 x5=hround(x1+0.64side-thick); y5=0.25side;
831 filldraw stroke z3e--z4e..pulled_arc.e(4,5)&pulled_arc.e(5,6)..z6e--z7e;
832 % bottom lobe
833 pos7'(thin,-90); pos8(thick,0); pos10(medium,90);
834 z7'=z7; z6'=z6; x6'r=x4r; x6'l=x4l; y6'r=y7'r; y6'l=y7'l;
835 z10r=z1; x9r=x6'r; x9l=x6'l; y9r=y10r; top y9r-bot y9l=medium; z9=.5[z9r,z9l];
836 x8=hround(x1+0.53side-thick); y8=.75side;
837 filldraw stroke z7'e--z6'e..pulled_arc.e(6',8)&pulled_arc.e(8,9)
838 ..z9e--z10e; % upper lobe
839 if serifs: serif(1,2,a, serif_darkness,-cap_jut);
840 serif(2,1,b,serif_darkness,-cap_jut);
841 numeric tempa_, tempb_; tempa_=slab; tempb_=bracket;
842 slab:=thin; bracket:=2/3cap_jut; serif(2,1,c,serif_darkness,2/3cap_jut);
843 slab:=tempa_; bracket:=tempb_; fi
844 proofpcbb(2, cap_jut+0.5thick, 0);
845 penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
846 penlabels(6',7'); endchar;
847
848 % \end{macrocode}
849 % \end{macro}
850 %
851 % \begin{macro}{c}
852 % The letter C. This is Pacioli's original definition.
853 % \begin{macrocode}
854
855 cmchar "Pacioli's original letter C";
856 beginchar("c",2u#+.95side#, cap_height#, 0);
857 adjust_fit(0, 0); if monospace: pickup fine.nib; else: pickup tiny.nib;fi
858 pcshiftx := u;
859 numeric alpha; alpha=w-u-thick;
860 pos2(thin, 90); x2=.5[x3r,x0r]; top y2r=h;% topmost pen position
861 pos3(thick,180); lft z3r=(u,h/2);
862 pos4(thin, 270); x4=x2; bot y4r=0; % bottommost pen position
863 pos0(thick,0); lft z0l=(w+thick-u,h/2);
864 path p, p', line.u, line.b; line.u=(alpha,1.5h)--(alpha,h/2);
865 line.b=(.5[alpha,x0],0)--(.5[alpha,x0],h/2);
866 p=pulled_arc.r(0,2)&pulled_arc.r(2,3)&pulled_arc.r(3,4)
867 &pulled_arc.r(4,0)&cycle;
868 p'=pulled_arc.l(0,2)&pulled_arc.l(2,3)&pulled_arc.l(3,4)
869 &pulled_arc.l(4,0)&cycle;
870 z'1l=line.u intersectionpoint p'; z'1r=line.u intersectionpoint p;
871 bot rt z1l=z'1l; top rt z1r=z'1r; z1=.5[z1l,z1r];
872 z'5l=line.b intersectionpoint p'; z'5r=line.b intersectionpoint p;
873 z5r = (side+pcshiftx-3/4thick, 3/4thick); z5l = (x5r+o, y5r+1.5thick); z5=.5[z5r,z5l];
874 if not monospace:
875 x1l:=x1l+.6thin; y1l:=y1r-1.0thick-2tiny;
876 y5l:=2thick+y5r-2tiny; fi
877 if monospace: x1:=x1l:=x1r:=x5; y1:=y1-thin; y1l:=y1l-thin; y1r:=y1r-.6thin; fi
878 % readjust to have a better opening in CDTT
879 numeric slope_factor; if monospace:slope_factor=4/3; else:slope_factor=3/4; fi
880 filldraw
881 z1r{-1,slope_factor}...{left}z2r..pulled_arc.r(2,3)&
882 pulled_arc.r(3,4)..{right}z4r..tension 0.9..z5r--
883 reverse
884 (z1l..tension 0.9..{left}z2l..pulled_arc.l(2,3)&pulled_arc.l(3,4)..{right}z4l
885 ..tension 0.9..z5l)
886 ..(z1l+(eps,0))--(z1r+(eps,0))..cycle;
887 proofpcbb(3, 0.5thick, 0.5side);
888 penlabels(0,1,2,3,4,5); endchar;
889
890 % \end{macrocode}
891 % \end{macro}
892 %
893 % \begin{macro}{C}
894 % The letter C. This includes an optical adjustment at the top and bottom
895 % of the character.
896 % \begin{macrocode}
897
898 cmchar "Pacioli's letter C";
899 beginchar("C",2u#+.95side#, cap_height#, 0);
900 adjust_fit(0, 0); if monospace: pickup fine.nib; else: pickup tiny.nib;fi
901 pcshiftx := u;
902 numeric alpha; alpha=w-u-thick;
903 pos2(thin, 90); x2=.5[x3r,x0r]; top y2r=h+o;% topmost pen position
904 pos3(thick,180); lft z3r=(u,h/2);
905 pos4(thin, 270); x4=x2; bot y4r=-o; % bottommost pen position
906 pos0(thick,0); lft z0l=(w+thick-u,h/2);
907 path p, p', line.u, line.b; line.u=(alpha,1.5h)--(alpha,h/2);
908 line.b=(.5[alpha,x0],0)--(.5[alpha,x0],h/2);
909 p=pulled_arc.r(0,2)&pulled_arc.r(2,3)&pulled_arc.r(3,4)
910 &pulled_arc.r(4,0)&cycle;
911 p'=pulled_arc.l(0,2)&pulled_arc.l(2,3)&pulled_arc.l(3,4)
912 &pulled_arc.l(4,0)&cycle;
913 z'1l=line.u intersectionpoint p'; z'1r=line.u intersectionpoint p;
914 bot rt z1l=z'1l; top rt z1r=z'1r; z1=.5[z1l,z1r];
915 z'5l=line.b intersectionpoint p'; z'5r=line.b intersectionpoint p;
916 z5r = (side+pcshiftx-3/4thick, 3/4thick); z5l = (x5r+o, y5r+1.5thick); z5=.5[z5r,z5l];
917 if not monospace:
918 x1l:=x1l+.6thin; y1l:=y1r-1.0thick-2tiny;
919 y5l:=2thick+y5r-2tiny; fi
920 if monospace: x1:=x1l:=x1r:=x5; y1:=y1-thin; y1l:=y1l-thin; y1r:=y1r-.6thin; fi
921 % readjust to have a better opening in CDTT
922 numeric slope_factor; if monospace:slope_factor=4/3; else:slope_factor=3/4; fi
923 filldraw
924 z1r{-1,slope_factor}...{left}z2r..pulled_arc.r(2,3)&
925 pulled_arc.r(3,4)..{right}z4r..tension 0.9..z5r--
926 reverse
927 (z1l..tension 0.9..{left}z2l..pulled_arc.l(2,3)&pulled_arc.l(3,4)..{right}z4l
928 ..tension 0.9..z5l)
929 ..(z1l+(eps,0))--(z1r+(eps,0))..cycle;
930 proofpcbb(3, 0.5thick, 0.5side);
931 penlabels(0,1,2,3,4,5); endchar;
932
933 % \end{macrocode}
934 % \end{macro}
935 %
936 % \begin{macro}{D}
937 % The letter D. With serifs, it fills the square.
938 % \begin{macrocode}
939
940 cmchar "Pacioli's letter D";
941 beginchar("D", cap_jut#+.95side#+u#, cap_height#, 0);
942 adjust_fit(cap_serif_fit#,0);
943 pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
944 lft x1l=.5u+cap_jut; x2=x1; bot y2=0; top y1=h;
945 filldraw stroke z1e--z2e; % stem
946 pos3(thin, 90); pos5(thick, 0); pos7(5/4thin, -90);
947 x3=x7=x1; top y3r=h; bot y7r=0;
948 y5=good.y h/2; x5=h-3/2thick+x1;
949 if not monospace: x4r=x6r=hround(w/2); top y4r=h; bot y6r=0;
950 bot y4l=vround(h-thin); top y6l=vround 5/4thin;
951 x4l=x6l; 2(lft x5l-x4l)=y4l-y6l;
952 z4=.5[z4l, z4r]; z6=.5[z6l, z6r];
953 else: pos4(thin,90); pos6(thin,-90); x4=x6=hround w/2; top y4r=h; bot y6r=0;
954 fi
955 filldraw stroke z3e{right}...pulled_super_arc.e(4,5,eta)&
956 pulled_super_arc.e(5,6,eta)...{left}z7e; % lobe
957 if serifs: serif(1, 2, a, serif_darkness, -cap_jut);
958 serif(2, 1, b, serif_darkness, -cap_jut);
959 if not monospace: numeric temp_; temp_=slab; slab:=5/4thin;
960 serif(2, 1, c, serif_darkness, cap_jut); slab:=temp_; fi fi
961 proofpcbb(2, cap_jut+0.5thick, 0);
962 penlabels(1,2,3,4,5,6,7); endchar;
963
964 % \end{macrocode}
965 % \end{macro}
966 %
967 % \begin{macro}{E}
968 % The letter E. It is half the width of the square, but the bottom arm
969 % is slighty longer.
970 % \begin{macrocode}
971
972 cmchar "Pacioli's letter E";
973 numeric topbar_; topbar_=1/2; % half the square for Pacioli
974 numeric middlebar_; middlebar_=10/31; % as measured
975 beginchar("E", u#+cap_jut#+5.25thick#, cap_height#,0);
976 adjust_fit(cap_serif_fit#,0);
977 pcshiftx := 0.5u;
978 pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
979 lft x1l=lft x2l=.5u+cap_jut; top y1=h; bot y2=0;
980 filldraw stroke z1e--z2e; % stem
981 pickup crisp.nib; % prepare for arms and serifs
982 pos3(medium,90); pos4(dslab,0);
983 x1=x3; top y3r=h; rt x4l=x2l+topbar_*side;
984 bot y4=vround(h-if monospace: 2 fi vstretch*thick);
985 arm(3,4,d,serif_darkness,0); % top arm and beak
986 pos5(thin,-90); pos0(thin,90); pos6(dslab,0); pos7(dslab,0);
987 x5=x0=x1; y5=y0=hround(h/2); rt x6r=rt x7r= x1r+middlebar_*side;
988 top y6-bot y7= thin+3/4thick; y5=.5[y6,y7];
989 arm(5,6,e,eta,0); arm(0,7,f,eta,0); % middle arms and beaks
990 % now do the bottom arm
991 pos8(medium,-90); pos9(dslab,0); x8=x2; bot y8r=0; rt x9r=hround(x2l+5.25thick);
992 y9=y8r+thick;
993 foot(8,9,g,serif_darkness,0.25thick); % lower arm
994 if serifs: serif(1,2,a,serif_darkness,-cap_jut);
995 serif(2,1,b,serif_darkness,-cap_jut);
996 if not monospace: temp_:=slab; slab:=medium; tmp_:=bracket; bracket:=cap_jut+medium;
997 serif(2,1,c,serif_darkness,cap_jut);
998 slab:=temp_; bracket:=tmp_; fi fi
999 proofpcbb(2, cap_jut+0.5thick, 0);
1000 penlabels(0,1,2,3,4,5,6,7,8,9); endchar; % end of "E"
1001
1002 % \end{macrocode}
1003 % \end{macro}
1004 %
1005 % \begin{macro}{F}
1006 % The letter F. This is an E without the bottom arm.
1007 % \begin{macrocode}
1008
1009 cmchar "Pacioli's letter F";
1010 numeric topbar_; topbar_=1/2; % half the square for Pacioli
1011 numeric middlebar_; middlebar_=10/31; % as measured
1012 beginchar("F", u#+1/2side#+cap_jut#, cap_height#,0);
1013 adjust_fit(cap_serif_fit#,0);
1014 pcshiftx := 0.5u;
1015 pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
1016 lft x1l=lft x2l=.5u+cap_jut; top y1=h; bot y2=0;
1017 filldraw stroke z1e--z2e; % stem
1018 pickup crisp.nib; % prepare for arms and serifs
1019 pos3(medium,90); pos4(dslab,0);
1020 x1=x3; top y3r=h; rt x4l= x2l+topbar_*side;
1021 bot y4=vround(h-if monospace: 2 fi vstretch*thick);
1022 arm(3,4,d,serif_darkness,0); % top arm and beak
1023 pos5(thin,-90); pos0(thin,90); pos6(dslab,0); pos7(dslab,0);
1024 x5=x0=x1; y5=y0=hround(h/2); rt x6r=rt x7r= x1r+middlebar_*side;
1025 top y6-bot y7= thin + 3/4thick; y5=.5[y6,y7];
1026 arm(5,6,e,eta,0); arm(0,7,f,eta,0); % middle arms and beaks
1027 if serifs: serif(1,2,a,serif_darkness,-cap_jut);
1028 serif(2,1,b,serif_darkness,-cap_jut); serif(2,1,c,serif_darkness, cap_jut);
1029 fi
1030 proofpcbb(2, cap_jut+0.5thick, 0);
1031 penlabels(0,1,2,3,4,5,6,7); endchar; % end of "F"
1032
1033 % \end{macrocode}
1034 % \end{macro}
1035 %
1036 % \begin{macro}{g}
1037 % The letter G. This is based on the C and is Pacioli's original definition.
1038 % \begin{macrocode}
1039
1040 cmchar "Pacioli's original letter G";
1041 beginchar("g",2u#+.925side#, cap_height#, 0);
1042 adjust_fit(0, cap_serif_fit#);
1043 pcshiftx := u;
1044 if monospace: pickup fine.nib; else: pickup tiny.nib;fi
1045 % This code is identical to that for the letter C.
1046 numeric alpha; alpha=w-u-thick;
1047 pos2(thin, 90); x2=.5[x3r,x0r]; top y2r=h;% topmost pen position
1048 pos3(thick,180); lft z3r=(u,h/2);
1049 pos4(thin, 270); x4=x2; bot y4r=0;
1050 pos0(thick,0); lft z0l=(w+thick-u,h/2);
1051 path p, p', line.u, line.b; line.u=(alpha,1.5h)--(alpha,h/2);
1052 line.b=(.5[alpha,x0],0)--(.5[alpha,x0],h/2);
1053 p=pulled_arc.r(0,2)&pulled_arc.r(2,3)&pulled_arc.r(3,4)
1054 &pulled_arc.r(4,0)&cycle;
1055 p'=pulled_arc.l(0,2)&pulled_arc.l(2,3)&pulled_arc.l(3,4)
1056 &pulled_arc.l(4,0)&cycle;
1057 z'1l=line.u intersectionpoint p'; z'1r=line.u intersectionpoint p;
1058 bot rt z1l=z'1l; top rt z1r=z'1r; z1=.5[z1l,z1r];
1059 z'5l=line.b intersectionpoint p'; z'5r=line.b intersectionpoint p;
1060 z5r = (side+pcshiftx-3/4thick, 3/4thick); z5l = (x5r+o, y5r+1.5thick); z5=.5[z5r, z5l];
1061 if not monospace:
1062 x1l:=x1l+.6thin; y1l:=y1r-1.0thick-2tiny;
1063 y5l:=2thick+y5r-2tiny; fi
1064 if monospace: x1:=x1l:=x1r:=x5; y1:=y1-thin; y1l:=y1l-thin; y1r:=y1r-.6thin; fi
1065 % readjust to have a better opening in CDTT
1066 numeric slope_factor; if monospace:slope_factor=4/3; else:slope_factor=3/4; fi
1067 % Addtional G work (preceding program is the same as that for letter C)!
1068 path p,p',line.o, line.i;
1069 p=z1r{-1,slope_factor}..{left}pulled_arc.r(2,3)&
1070 pulled_arc.r(3,4){right}..tension 0.9..z5r;
1071 p'= reverse
1072 (z1l..tension 0.9..{left}pulled_arc.l(2,3)&pulled_arc.l(3,4){right}
1073 ..tension 0.9..z5l);
1074 pos7(thick,0);
1075 top z7=(x1r,7/2thick);
1076 numeric counter; counter=0;
1077 forever:
1078 counter:=counter+1;
1079 line.o:=z7r--(x7r,-2o); line.i:=(z7r-(thick,0))--(x7r-thick,-2o);
1080 numeric t[],tt[];
1081 (t1,tt1)=p intersectiontimes line.o; (t2,tt2)=p' intersectiontimes line.i;
1082 exitif t1*t2>0; forsuffixes $$=l, r: x7$$:=x7$$-.1u; endfor
1083 x7:=x7-.1u; endfor
1084 x6r=x7r; x6l=x7l; bot y6r=ypart point t1 of p; bot y6l=ypart point t2 of p';
1085 z6=.5[z6r,z6l];
1086 p:= subpath(0,t1) of p..(z6r-xeps+yeps)--(z6l+xeps+yeps)..
1087 subpath(t2,infinity) of p'..(z1l+xeps)--cycle;
1088 filldraw p;
1089 filldraw z6l--z7l--z7r--z6r--cycle;
1090 if serifs: serif(7,6,a,serif_darkness,-srad);
1091 serif(7,6,b,serif_darkness, srad); fi
1092 proofpcbb(3, 0.5thick, 0.5side);
1093 penlabels(0,1,2,3,4,5,6,7); endchar;
1094
1095 % \end{macrocode}
1096 % \end{macro}
1097 %
1098 % \begin{macro}{G}
1099 % The letter G. This is based on the C and has optical adjustments.
1100 % \begin{macrocode}
1101
1102 cmchar "Pacioli's letter G";
1103 beginchar("G",2u#+.925side#, cap_height#, 0);
1104 adjust_fit(0, cap_serif_fit#);
1105 pcshiftx := u;
1106 if monospace: pickup fine.nib; else: pickup tiny.nib;fi
1107 % This code is identical to that for the letter C.
1108 numeric alpha; alpha=w-u-thick;
1109 pos2(thin, 90); x2=.5[x3r,x0r]; top y2r=h+o;% topmost pen position
1110 pos3(thick,180); lft z3r=(u,h/2);
1111 pos4(thin, 270); x4=x2; bot y4r=-o;
1112 pos0(thick,0); lft z0l=(w+thick-u,h/2);
1113 path p, p', line.u, line.b; line.u=(alpha,1.5h)--(alpha,h/2);
1114 line.b=(.5[alpha,x0],0)--(.5[alpha,x0],h/2);
1115 p=pulled_arc.r(0,2)&pulled_arc.r(2,3)&pulled_arc.r(3,4)
1116 &pulled_arc.r(4,0)&cycle;
1117 p'=pulled_arc.l(0,2)&pulled_arc.l(2,3)&pulled_arc.l(3,4)
1118 &pulled_arc.l(4,0)&cycle;
1119 z'1l=line.u intersectionpoint p'; z'1r=line.u intersectionpoint p;
1120 bot rt z1l=z'1l; top rt z1r=z'1r; z1=.5[z1l,z1r];
1121 z'5l=line.b intersectionpoint p'; z'5r=line.b intersectionpoint p;
1122 z5r = (side+pcshiftx-3/4thick, 3/4thick); z5l = (x5r+o, y5r+1.5thick); z5=.5[z5r, z5l];
1123 if not monospace:
1124 x1l:=x1l+.6thin; y1l:=y1r-1.0thick-2tiny;
1125 y5l:=2thick+y5r-2tiny; fi
1126 if monospace: x1:=x1l:=x1r:=x5; y1:=y1-thin; y1l:=y1l-thin; y1r:=y1r-.6thin; fi
1127 % readjust to have a better opening in CDTT
1128 numeric slope_factor; if monospace:slope_factor=4/3; else:slope_factor=3/4; fi
1129 % Addtional G work (preceding program is the same as that for letter C)!
1130 path p,p',line.o, line.i;
1131 p=z1r{-1,slope_factor}..{left}pulled_arc.r(2,3)&
1132 pulled_arc.r(3,4){right}..tension 0.9..z5r;
1133 p'= reverse
1134 (z1l..tension 0.9..{left}pulled_arc.l(2,3)&pulled_arc.l(3,4){right}
1135 ..tension 0.9..z5l);
1136 pos7(thick,0);
1137 top z7=(x1r,7/2thick);
1138 numeric counter; counter=0;
1139 forever:
1140 counter:=counter+1;
1141 line.o:=z7r--(x7r,-2o); line.i:=(z7r-(thick,0))--(x7r-thick,-2o);
1142 numeric t[],tt[];
1143 (t1,tt1)=p intersectiontimes line.o; (t2,tt2)=p' intersectiontimes line.i;
1144 exitif t1*t2>0; forsuffixes $$=l, r: x7$$:=x7$$-.1u; endfor
1145 x7:=x7-.1u; endfor
1146 x6r=x7r; x6l=x7l; bot y6r=ypart point t1 of p; bot y6l=ypart point t2 of p';
1147 z6=.5[z6r,z6l];
1148 p:= subpath(0,t1) of p..(z6r-xeps+yeps)--(z6l+xeps+yeps)..
1149 subpath(t2,infinity) of p'..(z1l+xeps)--cycle;
1150 filldraw p;
1151 filldraw z6l--z7l--z7r--z6r--cycle;
1152 if serifs: serif(7,6,a,serif_darkness,-srad);
1153 serif(7,6,b,serif_darkness, srad); fi
1154 proofpcbb(3, 0.5thick, 0.5side);
1155 penlabels(0,1,2,3,4,5,6,7); endchar;
1156
1157 % \end{macrocode}
1158 % \end{macro}
1159 %
1160 % \begin{macro}{H}
1161 % The letter H. With serifs, this fills the square. The two legs are
1162 % |thick| and the cross-bar is |thin| like the A.
1163 % \begin{macrocode}
1164
1165 cmchar "Pacioli's letter H";
1166 beginchar("H", u#+side#, cap_height#,0);
1167 adjust_fit(cap_serif_fit#, cap_serif_fit#); pickup tiny.nib;
1168 forsuffixes t=1,2,3,4: pos.t(thick,0); endfor
1169 lft x1l=lft x2l=.5u+cap_jut; bot y2=0; top y1=h;
1170 filldraw stroke z1e--z2e; % left vertical stem
1171 x3=x4=w-x1; y3=y1; y4=y2;
1172 filldraw stroke z3e--z4e; % right vertical stem
1173 pos5(thin, 90); pos6(thin,90);
1174 x5=.5[x1r,x1l]; x6=w-x5; top y5r=top y6r=h/2;
1175 filldraw stroke z5e--z6e; % horizontal crossbar
1176 if serifs:
1177 serif(1,2,a,serif_darkness,-cap_jut); serif(1,2,b,serif_darkness,cap_jut);
1178 serif(2,1,c,serif_darkness,-cap_jut); serif(2,1,d,serif_darkness,cap_jut);
1179 serif(3,4,e,serif_darkness,-cap_jut); serif(3,4,f,serif_darkness,cap_jut);
1180 serif(4,3,g,serif_darkness,-cap_jut); serif(4,3,h,serif_darkness,cap_jut); fi
1181 proofpcbb(2, cap_jut+0.5thick, 0);
1182 labels(1,2,3,4,5,6); endchar;
1183
1184 % \end{macrocode}
1185 % \end{macro}
1186 %
1187 % \begin{macro}{I}
1188 % The letter I.
1189 % \begin{macrocode}
1190
1191 cmchar "Pacioli's letter I";
1192 beginchar("I", .5u#+2cap_jut#+cap_stem#+.5u#, cap_height#,0);
1193 adjust_fit(cap_serif_fit#, cap_serif_fit#);
1194 pickup tiny.nib; checkthin; pos1(cap_stem,0); pos2(cap_stem,0);
1195 x1=x2=hround(w/2); top y1=h; bot y2=0;
1196 filldraw stroke z1e--z2e; % vertical stem
1197 if serifs:
1198 serif(1, 2, a, serif_darkness, -cap_jut);
1199 serif(1, 2, b, serif_darkness, cap_jut); % top lft,rt
1200 serif(2, 1, c, serif_darkness, -cap_jut);
1201 serif(2, 1, d, serif_darkness, cap_jut); % bot lft,rt
1202 fi
1203 proofpcbb(2, 0.5side, 0);
1204 penlabels(1, 2); endchar;
1205
1206 % \end{macrocode}
1207 % \end{macro}
1208 %
1209 % \begin{macro}{J}
1210 % The letter J. Pacioli didn't specify a J, so we'll use D\"{u}rer's
1211 % J instead (with suitable changes to the serifs).
1212 % \begin{macrocode}
1213
1214 cmchar "Pacioli's letter J";
1215 %% Pacioli didn't have a J, so use Durer's.
1216 beginchar("J",u#+3thick#+cap_jut#,cap_height#, 1/4 cap_height#);
1217 adjust_fit(0, cap_serif_fit#); pickup tiny.nib;
1218 pos1(thick,0); pos2(thick,0); pos3(thin, -90);
1219 top y1=h; rt x1r=w-.5u-cap_jut; x2=x1; bot y2=0; lft x3=.5u; bot y3r=-d;
1220 filldraw stroke z1e--z2e{down}..{left}z3e;
1221 if serifs: serif(1,2,a,serif_darkness,-cap_jut);
1222 serif(1,2,b,serif_darkness,cap_jut); fi
1223 proofpcbb(2, 0.5side, 0);
1224 penlabels(1,2,3); endchar;
1225
1226 % \end{macrocode}
1227 % \end{macro}
1228 %
1229 % \begin{macro}{K}
1230 % The letter K.
1231 % \begin{macrocode}
1232
1233 cmchar "Pacioli's letter K";
1234 beginchar("K", 3/2u#+side#, cap_height#,0);
1235 adjust_fit(cap_serif_fit#,0); pickup tiny.nib;
1236 pcshiftx := 3/4u;
1237 pair durer[]; % represent Pacioli's corner points
1238 durer1=(pcshiftx,side); durer2=(pcshiftx+side,side); durer3=(xpart durer1,0);
1239 durer4=(xpart durer2,0);
1240 numeric diag_angle[];
1241 diag_angle1=angle(durer2-durer3);
1242 diag_angle2=angle(durer1-durer4);
1243 numeric alpha;
1244 alpha=((xpart durer2 - xpart durer1)++h)/h;
1245 pos1(thick,0); pos2(thick,0);
1246 lft x1l=lft x2l=pcshiftx+cap_jut;
1247 top y1=h; bot y2=0; filldraw stroke z1e--z2e; % left stem
1248 pos3(alpha*medium,0); pos4(alpha*medium,0); z4l = (x2,h/2);
1249 top y3=h; z3r-z4r=whatever*(durer2-durer3);
1250 z0=whatever[z1r,z2r]=whatever[z3l,z4l];
1251 filldraw z4l--z3l--z3r--z4r--cycle; % upper diagonal stroke
1252 pos5(alpha*thick,0); pos6(alpha*thick,0);
1253 z5l = z4l;
1254 bot y6=0; z5r-z6r=whatever*(durer1-durer4);
1255 z10 = whatever[z3r,z4r]=whatever[z6r,z5r];
1256 filldraw z6l--z5l--z10--z6r--cycle; % bottom leg
1257 if serifs:
1258 serif(1,2,a,serif_darkness,-cap_jut); serif(1,2,b,serif_darkness,cap_jut);
1259 serif(2,1,c,serif_darkness,-cap_jut); serif(2,1,d,serif_darkness,cap_jut);
1260 numeric old_jut, old_brack; old_jut=cap_jut; old_brack=bracket;
1261 % serifs on top leg
1262 bracket:=.5old_brack;cap_jut:=.5old_jut;
1263 if not monospace: serif(3,4,e,serif_darkness,-cap_jut); fi
1264 bracket:=2old_brack; cap_jut:=2old_jut;
1265 serif(3,4,f,.6serif_darkness,if monospace:.7 fi cap_jut);
1266 % serifs on bottom leg
1267 bracket:=.5old_brack;cap_jut:=.5old_jut;
1268 if not monospace: serif(6,5,g,serif_darkness,-cap_jut); fi
1269 bracket:=2old_brack; cap_jut:=2old_jut;
1270 serif(6,5,h,.6serif_darkness,if monospace:.7 fi cap_jut);
1271 cap_jut:=old_jut; bracket:=old_brack;
1272 fi
1273 proofpcbb(2, pcshiftx+cap_jut+0.5thick, 0);
1274 penlabels(0,1,2,3,4,5,6,7); endchar;
1275
1276 % \end{macrocode}
1277 % \end{macro}
1278 %
1279 % \begin{macro}{L}
1280 % The letter L. This is similar, but not identical, to the left leg and
1281 % bottom arm of Pacioli's E.
1282 % \begin{macrocode}
1283
1284 cmchar "Pacioli's letter L";
1285 numeric topbar_; if monospace: topbar_=11/15;
1286 else: topbar_=17/30; fi % Duerer's wierd value
1287 beginchar("L", u#+cap_jut#+5.75thick#, cap_height#,0);
1288 adjust_fit(cap_serif_fit#,0);
1289 pcshiftx := 0.5u;
1290 pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
1291 lft x1l=lft x2l=.5u+cap_jut; top y1=h; bot y2=0;
1292 filldraw stroke z1e--z2e; % stem
1293 pickup crisp.nib; % prepare for arms and serifs
1294 pos3(thin,90);
1295 pos8(medium,-90); pos9(dslab,0); x8=x2; bot y8r=0; rt x9r=hround(x2l+5.75thick);
1296 y9=y8r+1.5thick; foot(8,9,g,serif_darkness,0.75thick);
1297 % lower arm
1298 if serifs: serif(1,2,a,serif_darkness,-cap_jut);
1299 serif(2,1,b,serif_darkness,-cap_jut); serif(1,2,d,serif_darkness,cap_jut);
1300 if not monospace: temp_:=slab; slab:=medium; tmp_:=bracket; bracket:=thick+medium;
1301 serif(2,1,c,serif_darkness,thick);
1302 slab:=temp_; bracket:=tmp_; fi fi
1303 proofpcbb(2, cap_jut+0.5thick, 0);
1304 penlabels(0,1,2,3,4,5,6,7,8,9); endchar; % end of "L"
1305
1306 % \end{macrocode}
1307 % \end{macro}
1308 %
1309 % \begin{macro}{M}
1310 % The letter M. This has slightly sloping right and left legs. The serifs
1311 % extend a little way outside the square.
1312 % \begin{macrocode}
1313
1314 cmchar"Pacioli's letter M";
1315 beginchar("M", u#+cap_jut#+side#, cap_height#, 0);
1316 adjust_fit(cap_serif_fit#, cap_serif_fit#); pickup tiny.nib;
1317 pcshiftx := 0.5u;
1318 pos1(medium,0); pos2(medium,0);
1319 lft x2l=pcshiftx+cap_jut; top y1=h; bot y2=0;
1320 lft x1l = lft x2l + side*sind(1); % left leg has 1 degree angle
1321 pos3(thick,0); pos4(thick,0);
1322 x4r=pcshiftx+side; top y3=h; bot y4=0;
1323 x3r=x4r-side*sind(3); % right leg has 3 degree angle
1324 numeric long, short, hypot, alpha; long=side; short=1/2side;
1325 hypot=long++short; alpha=hypot/long;
1326 pos5(alpha*thick,0); pos6(alpha*thick,0); % left inner
1327 z5l=(2pcshiftx,side); bot lft z6l=(pcshiftx+1/2side,0);
1328 pos7(alpha*medium,0); pos8(alpha*medium,0); % right inner
1329 z7r=z6l; z8r=z3r; z0=whatever[z5r,z6r]=whatever[z7l,z8l];
1330 z10=whatever[z5l,z6l]=whatever[z1r,z2r];
1331 z11=whatever[z7r,z8r]=whatever[z3l,z4l];
1332 % draw the M all in one go
1333 filldraw z5r--z0--z8l--z3r--z4r--z4l--z11--z6l--z10--z2r--z2l--z1l--cycle;
1334 if serifs:
1335 serif(2,1,a,serif_darkness,-cap_jut); serif(1,2,b,serif_darkness,-lrad);
1336 serif(3,4,c,serif_darkness, lrad); serif(4,3,d,serif_darkness, lrad);
1337 serif(2,1,e,serif_darkness,cap_jut); serif(4,3,f,serif_darkness,-cap_jut);
1338 % lower, inner serifs
1339 fi
1340 proofpcbb(2, cap_jut+0.5medium, 0);
1341 penlabels(0,1,2,3,4,5,6,7,8,10,11); endchar;
1342
1343 % \end{macrocode}
1344 % \end{macro}
1345 %
1346 % \begin{macro}{N}
1347 % The letter N. With serifs it fills the square, and perhaps the top left
1348 % serif protrudes a tiny bit.
1349 % \begin{macrocode}
1350
1351 cmchar "Pacioli's letter N";
1352 beginchar("N", u#+2cap_jut#+.8side#, cap_height#,0);
1353 adjust_fit(cap_serif_fit#, cap_serif_fit#); pickup tiny.nib;
1354 numeric long, short, hypot, alpha; long=h; short=side-2cap_jut;
1355 hypot=long++short; alpha=hypot/long;
1356 pos1(medium,0); pos2(medium,0); lft x1l=lft x2l=.5u+cap_jut; top y1=h; bot y2=0;
1357 pos3(medium,0); pos4(medium,0); x3=x4; x3=x2+side-2cap_jut-medium; y3=y1; y4=y2;
1358 pos 5(alpha*thick,0); pos6(alpha*thick,0);
1359 z5r=z1r; z6l=z4r; z0=whatever[z1r,z2r]=whatever[z5l,z6l]; % under notch point
1360 z0'=whatever[z5r,z6r]=whatever[z3l,z4l];
1361 filldraw z1r--z1l--z2l--z2r--z0--z6l--z3r--z3l--z0'--cycle;
1362 if serifs:
1363 serif(2,1,b,serif_darkness,-cap_jut); serif(2,1,c,serif_darkness,cap_jut);
1364 % bottom, left serifs
1365 serif(3,4,d,serif_darkness,-cap_jut);serif(3,4,e,serif_darkness,cap_jut);
1366 % top right serifs
1367 z.a=(x1l-1.5cap_jut,y1); pickup tiny.nib; filldraw
1368 z0{z0-z4r}..{left}(z.a-(0,eps))..z.a--z1r--cycle;
1369 % top left serif
1370 serif(1,2,a,serif_darkness,-lrad);
1371 fi
1372 proofpcbb(2, cap_jut+0.5medium, 0);
1373 penlabels(0,0',1,2,3,4,5,6); endchar;
1374
1375 % \end{macrocode}
1376 % \end{macro}
1377 %
1378 % \begin{macro}{o}
1379 % The letter O. He actually specifies two versions of the letter, but
1380 % this one is \textit{perfectissimo}. It is oversquare horizontally.
1381 % \begin{macrocode}
1382
1383 cmchar "Pacioli's original letter O";
1384 beginchar("o", 2u#+side#+2o#, cap_height#, 0);
1385 adjust_fit(0,0); pair durer[];
1386 pcshiftx := u;
1387 x2r=pcshiftx-o; x4r=w-pcshiftx+o; y1r=h; y3r=0; z0=(w/2,h/2);
1388 z0=.5[z5,z6]; numeric axis_angle;
1389 durer1=(x2r,y1r-o); durer2=(x4r, ypart durer1);
1390 durer3=(xpart durer1, y3r+o); durer4=(xpart durer2, ypart durer3);
1391 axis_angle=angle(durer2-durer3);
1392 z5-z6=(thick,0)rotated axis_angle;
1393 y2r=y6; y4r=y5; x1r=x5; x3r=x6;
1394 forsuffixes $=1,2,3,4: z$=.5[z$l,z$r]; endfor
1395 x1l=x3r; y1l-y6=y6-y3r; x5-x2l=x4r-x5; y2l=y4r;
1396 x3l=x1r; y1r-y5=y5-y3l; x4l-x6=x6-x2r; y4l=y2r;
1397 path p,p';
1398 p=pulled_arc.r(1,2)&reverse pulled_arc.r(3,2)&
1399 pulled_arc.r(3,4)&reverse pulled_arc.r(1,4)&cycle;
1400 path anti_diag; anti_diag=z0--durer1;
1401 z21r=p intersectionpoint anti_diag; penpos21(thin, axis_angle+90);
1402 x43r=w-x21r; y43r=h-y21r; penpos43(thin, axis_angle+270);
1403 path diag; diag=z0--durer2;
1404 z41r=diag intersectionpoint p; penpos41(thick, axis_angle);
1405 x32r=w-x41r; y32r=h-y41r; penpos32(thick, axis_angle+180);
1406 if not monospace: p'=
1407 z1l{left}..z21l..z2l{down}..z32l..
1408 z3l{right}..z43l..
1409 z4l{up}..z41l..{left}cycle;
1410 else:p'=z1l..z21l..z32l..z3l..z43l..z41l..cycle; fi
1411 fill p; unfill p';
1412 proofpcbb(0, 0.5side, 0.5side);
1413 penlabels(0,1,2,3,4,5,6,21,32,43,41); endchar;
1414
1415 % \end{macrocode}
1416 % \end{macro}
1417 %
1418 % \begin{macro}{O}
1419 % The letter O. This includes optical adjustments at the top and bottom.
1420 % \begin{macrocode}
1421
1422 cmchar "Pacioli's letter O";
1423 beginchar("O", 2u#+side#+2o#, cap_height#, 0);
1424 adjust_fit(0,0); pair durer[];
1425 pcshiftx := u;
1426 x2r=pcshiftx-o; x4r=w-pcshiftx+o; y1r=h+o; y3r=-o; z0=(w/2,h/2);
1427 z0=.5[z5,z6]; numeric axis_angle;
1428 durer1=(x2r,y1r-o); durer2=(x4r, ypart durer1);
1429 durer3=(xpart durer1, y3r+o); durer4=(xpart durer2, ypart durer3);
1430 axis_angle=angle(durer2-durer3);
1431 z5-z6=(thick,0)rotated axis_angle;
1432 y2r=y6; y4r=y5; x1r=x5; x3r=x6;
1433 forsuffixes $=1,2,3,4: z$=.5[z$l,z$r]; endfor
1434 x1l=x3r; y1l-y6=y6-y3r; x5-x2l=x4r-x5; y2l=y4r;
1435 x3l=x1r; y1r-y5=y5-y3l; x4l-x6=x6-x2r; y4l=y2r;
1436 path p,p';
1437 p=pulled_arc.r(1,2)&reverse pulled_arc.r(3,2)&
1438 pulled_arc.r(3,4)&reverse pulled_arc.r(1,4)&cycle;
1439 path anti_diag; anti_diag=z0--durer1;
1440 z21r=p intersectionpoint anti_diag; penpos21(thin, axis_angle+90);
1441 x43r=w-x21r; y43r=h-y21r; penpos43(thin, axis_angle+270);
1442 path diag; diag=z0--durer2;
1443 z41r=diag intersectionpoint p; penpos41(thick, axis_angle);
1444 x32r=w-x41r; y32r=h-y41r; penpos32(thick, axis_angle+180);
1445 if not monospace: p'=
1446 z1l{left}..z21l..z2l{down}..z32l..
1447 z3l{right}..z43l..
1448 z4l{up}..z41l..{left}cycle;
1449 else:p'=z1l..z21l..z32l..z3l..z43l..z41l..cycle; fi
1450 fill p; unfill p';
1451 proofpcbb(0, 0.5side, 0.5side);
1452 penlabels(0,1,2,3,4,5,6,21,32,43,41); endchar;
1453
1454 % \end{macrocode}
1455 % \end{macro}
1456 %
1457 % \begin{macro}{P}
1458 % The letter P.
1459 % \begin{macrocode}
1460
1461 cmchar "Pacioli's letter P";
1462 beginchar("P", 1.5u#+P_width#, cap_height#, 0);
1463 adjust_fit(cap_serif_fit#, 0);
1464 pickup tiny.nib; pos1(thick,0); pos2(thick,0);
1465 top lft z1l=(.5u+cap_jut,h); bot lft z2l=(.5u+cap_jut,0);
1466 filldraw stroke z1e--z2e; % vertical stem
1467 pos3(medium,90); pos4(medium,90); pos5(thick,0);
1468 pos6(if not monospace and serifs: .5thin else:thin fi,-90);
1469 top y3r=top y4r=h; x3=x1; x4=x1r+thick; filldraw stroke z3e--z4e;
1470 x6=x4; y6=hround(h/2 -medium); rt x5r=hround(x2+0.65side-cap_jut-0.5medium); y5=.75side;
1471 y7=y6; if serifs: x7=.5[rt x1r, x6]; else: x7=x3; fi
1472 pos7(if not monospace and serifs:.5thin else:thin fi,-90);
1473 filldraw stroke pulled_super_arc.e(4,5,eta)&pulled_super_arc.e(5,6,eta)
1474 ..z7e; % lobe
1475 if serifs: serif(1,2,a,serif_darkness,-cap_jut);
1476 serif(2,1,b,serif_darkness,-cap_jut);
1477 serif(2,1,c,serif_darkness,cap_jut); fi
1478 proofpcbb(2, cap_jut+0.5thick, 0);
1479 penlabels(1,2,3,4,5,6,7); endchar;
1480
1481 % \end{macrocode}
1482 % \end{macro}
1483 %
1484 % \begin{macro}{q}
1485 % The letter Q. It is essentially an O with a long (not very attractive)
1486 % tail.
1487 % \begin{macrocode}
1488
1489 cmchar "Pacioli's original letter Q";
1490 beginchar("q", 2u#+side#+2o#, cap_height#, 0);
1491 adjust_fit(0,0); pair durer[];
1492 pcshiftx := u;
1493 x2r=pcshiftx-o; x4r=w-pcshiftx+o; y1r=h; y3r=0; z0=(w/2,h/2);
1494 z0=.5[z5,z6]; numeric axis_angle;
1495 durer1=(x2r,y1r-o); durer2=(x4r, ypart durer1);
1496 durer3=(xpart durer1, y3r+o); durer4=(xpart durer2, ypart durer3);
1497 axis_angle=angle(durer2-durer3);
1498 z5-z6=(thick,0)rotated axis_angle;
1499 y2r=y6; y4r=y5; x1r=x5; x3r=x6;
1500 forsuffixes $=1,2,3,4: z$=.5[z$l,z$r]; endfor
1501 x1l=x3r; y1l-y6=y6-y3r; x5-x2l=x4r-x5; y2l=y4r;
1502 x3l=x1r; y1r-y5=y5-y3l; x4l-x6=x6-x2r; y4l=y2r;
1503 path p,p';
1504 p=pulled_arc.r(1,2)&reverse pulled_arc.r(3,2)&
1505 pulled_arc.r(3,4)&reverse pulled_arc.r(1,4)&cycle;
1506 path anti_diag; anti_diag=z0--durer1;
1507 z21r=p intersectionpoint anti_diag; penpos21(thin, axis_angle+90);
1508 x43r=w-x21r; y43r=h-y21r; penpos43(thin, axis_angle+270);
1509 path diag; diag=z0--durer2;
1510 z41r=diag intersectionpoint p; penpos41(thick, axis_angle);
1511 x32r=w-x41r; y32r=h-y41r; penpos32(thick, axis_angle+180);
1512 if not monospace: p'=
1513 z1l{left}..z21l..z2l{down}..z32l..
1514 z3l{right}..z43l..
1515 z4l{up}..z41l..{left}cycle;
1516 else:p'=z1l..z21l..z32l..z3l..z43l..z41l..cycle; fi
1517 fill p; unfill p';
1518 % now for the tail!
1519 z10r=z3l; z10l=z3r;
1520 z11r=(pcshiftx+side,-0.25side); z11l=z11r-(0,thick);
1521 z12l=z11l+(0.5side+medium,-thick); z12r=z12l+(0,0.5thin);
1522 filldraw z10r..z11r..z12r--z12l..z11l..z10l--cycle;
1523 proofpcbb(0, 0.5side, 0.5side);
1524 penlabels(0,1,2,3,4,5,6,10,11,12,13,14,15); endchar;
1525
1526 % \end{macrocode}
1527 % \end{macro}
1528 %
1529 % \begin{macro}{Q}
1530 % The letter Q. This includes the optical adjustments.
1531 %
1532 % \begin{macrocode}
1533
1534 cmchar "Pacioli's letter Q";
1535 beginchar("Q", 2u#+side#+2o#, cap_height#, 0);
1536 adjust_fit(0,0); pair durer[];
1537 pcshiftx := u;
1538 x2r=pcshiftx-o; x4r=w-pcshiftx+o; y1r=h+o; y3r=-o; z0=(w/2,h/2);
1539 z0=.5[z5,z6]; numeric axis_angle;
1540 durer1=(x2r,y1r-o); durer2=(x4r, ypart durer1);
1541 durer3=(xpart durer1, y3r+o); durer4=(xpart durer2, ypart durer3);
1542 axis_angle=angle(durer2-durer3);
1543 z5-z6=(thick,0)rotated axis_angle;
1544 y2r=y6; y4r=y5; x1r=x5; x3r=x6;
1545 forsuffixes $=1,2,3,4: z$=.5[z$l,z$r]; endfor
1546 x1l=x3r; y1l-y6=y6-y3r; x5-x2l=x4r-x5; y2l=y4r;
1547 x3l=x1r; y1r-y5=y5-y3l; x4l-x6=x6-x2r; y4l=y2r;
1548 path p,p';
1549 p=pulled_arc.r(1,2)&reverse pulled_arc.r(3,2)&
1550 pulled_arc.r(3,4)&reverse pulled_arc.r(1,4)&cycle;
1551 path anti_diag; anti_diag=z0--durer1;
1552 z21r=p intersectionpoint anti_diag; penpos21(thin, axis_angle+90);
1553 x43r=w-x21r; y43r=h-y21r; penpos43(thin, axis_angle+270);
1554 path diag; diag=z0--durer2;
1555 z41r=diag intersectionpoint p; penpos41(thick, axis_angle);
1556 x32r=w-x41r; y32r=h-y41r; penpos32(thick, axis_angle+180);
1557 if not monospace: p'=
1558 z1l{left}..z21l..z2l{down}..z32l..
1559 z3l{right}..z43l..
1560 z4l{up}..z41l..{left}cycle;
1561 else:p'=z1l..z21l..z32l..z3l..z43l..z41l..cycle; fi
1562 fill p; unfill p';
1563 % now for the tail!
1564 z10r=z3l; z10l=z3r;
1565 z11r=(pcshiftx+side,-0.25side); z11l=z11r-(0,thick);
1566 z12l=z11l+(0.5side+medium,-thick); z12r=z12l+(0,0.5thin);
1567 filldraw z10r..z11r..z12r--z12l..z11l..z10l--cycle;
1568 proofpcbb(0, 0.5side, 0.5side);
1569 penlabels(0,1,2,3,4,5,6,10,11,12,13,14,15); endchar;
1570
1571 % \end{macrocode}
1572 % \end{macro}
1573 %
1574 % \begin{macro}{R}
1575 % The letter R. Another character that, with serifs, fills the square.
1576 % \begin{macrocode}
1577
1578 cmchar "Pacioli's letter R";
1579 beginchar("R", u#+side#, cap_height#,0);
1580 adjust_fit(cap_serif_fit#,0);
1581 pickup tiny.nib; pos1(thick,0); pos2(thick,0);
1582 top lft z1l=(.5u+cap_jut,h); bot lft z2l=(.5u+cap_jut,0);
1583 filldraw stroke z1e--z2e; % vertical stem
1584 pos3(thin,90); pos4(thin,90); pos5(thick,0);
1585 pos6(thin, -90);
1586 top y3r=top y4r=h; x3=x1; x4=x1r+thick;
1587 x6=x4; y6=hround h/2; rt x5r=hround(.5u+P_width if not monospace:
1588 +1/2thin fi); y5=.5[y4,y6];
1589 y7=y6; x7=x3; pos7(thin, -90);
1590 filldraw stroke z3e--pulled_super_arc.e(4,5,eta)&
1591 pulled_super_arc.e(5,6,eta)..z7e; % lobe
1592 numeric half_letter_width; 2half_letter_width+1/2u=w;
1593 if serifs: half_letter_width:=half_letter_width+1/2u;
1594 else: half_letter_width:=half_letter_width-1.6thin; fi
1595 path p; p=pulled_super_arc.r(5,6,eta)..z7r;
1596 z0r=p intersectionpoint ((half_letter_width,0)--(half_letter_width,h));
1597 path circ_; circ_= (((halfcircle scaled 2thick) rotated 180) shifted z0r);
1598 z0l= p intersectionpoint circ_;
1599 if not monospace: z0'=(.45[half_letter_width,w],0);
1600 else: z0'=(.42[half_letter_width,w],0); fi
1601 numeric tail_angle; tail_angle=angle(z0l-z0');
1602 penpos8(thick, tail_angle-90); z8l=whatever[z0', z0l];
1603 x8=1/5[half_letter_width,w];
1604 penpos9(2/3thick,tail_angle-90); z9r=whatever[z0r, z8r];
1605 x9r=.5[half_letter_width, w];
1606 %penpos10(if monospace:1/2 fi dslab,90); z10l=(w,0);
1607 penpos10(if monospace:1/2 dslab else: .5thin fi,90); z10l=(w,0);
1608 fill z0l--z8l...{right}z10l--z10r{-w,1/4h}..z9r--z0r--cycle; % tail
1609 if serifs: serif(1,2,a,serif_darkness,-cap_jut);
1610 serif(2,1,b,serif_darkness,-cap_jut);
1611 serif(2,1,c,serif_darkness,cap_jut); fi
1612 proofpcbb(2, 1.5cap_jut+0.5thick, 0);
1613 penlabels(0,1,2,3,4,5,6,7,8,9,10); labels(0'); endchar;
1614
1615 % \end{macrocode}
1616 % \end{macro}
1617 %
1618 % \begin{macro}{S}
1619 % The letter S. Pacioli's instructions are unclear. I have used a
1620 % modified version of Hoenig's modification of the Knuthian S, which
1621 % appears to match Pacioli's
1622 % drawing.
1623 % \begin{macrocode}
1624
1625 cmchar "The Knuthian S";
1626 beginchar("S", 2u#+1/2 side# if not monospace:+thick# fi, cap_height#, 0);
1627 adjust_fit(0,0); pickup tiny.nib;
1628 pair durer[]; % points to contain corner coords of Durer square
1629 ypart durer3=ypart durer4=0; xpart durer4-xpart durer1=side;
1630 xpart durer1=u-1.5thick;
1631 durer1=(xpart durer3, h); durer2=(xpart durer 4, ypart durer1);
1632 numeric slope, diag_angle; diag_angle=angle(durer2-durer3);
1633 slope=-if not monospace: 3/4 else: 1/2 fi h/(xpart durer4-xpart durer3);
1634 pos0(thick,diag_angle); x0=.52[xpart durer1, xpart durer2];
1635 y0=h/2;
1636 lft x3l=u if not monospace:+2/3thick fi; rt x3r=lft x3l+5/6thick;
1637 pos2(thin,-diag_angle); top y2l=h;
1638 if x0-x3r>thick: x2l=x0 if monospace:+.4thin fi; else:
1639 x2l=x0r; slope:=-1/2; fi
1640 ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r);
1641 pos7(thin,-diag_angle); x7r=x0; bot y7r=0; rt x6r=w-if monospace:.75 fi u;
1642 lft x6l=rt x6r-thick;
1643 ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r);
1644 pos1(max(currentbreadth+eps,5/6 thick),-90);
1645 top y1l=h-thin; rt x1=x0+2thick+o;
1646 pos8(1.5thick,-80);lft x8r=u; bot y8r=medium;
1647 if not monospace:
1648 filldraw z1l..z2l{left}..{down}z3l..z4l--z5l..{down}z6l..{left}z7l..z8l
1649 --z8r..{right}z7r..{up}z6r..z5r--z4r..{up}z3r..{right}z2r..z1r--cycle;
1650 else: draw z1l..z2l{left}..{down}z3l..z4l--z5l..{down}z6l..{left}z7l..z8l;
1651 draw z8r..{right}z7r..{up}z6r..z5r--z4r..{up}z3r..{right}z2r..z1r;
1652 fi
1653 proofpcbb(0, 0.5side, 0.5side);
1654 penlabels(0,1,2,3,4,5,6,7,8); endchar;
1655
1656 % \end{macrocode}
1657 % \end{macro}
1658 %
1659 % \begin{macro}{T}
1660 % The letter T.
1661 % \begin{macrocode}
1662
1663 cmchar "Pacioli's letter T";
1664 beginchar("T",2u#+side#-2medium#, cap_height#,0);
1665 adjust_fit(0,0); pickup tiny.nib;
1666 pos1(thick,0); pos2(thick,0); .5[x1r,x1l]=w/2; .5[x2r,x2l]=w/2;
1667 top y1=h; bot y2=0; filldraw stroke z1e--z2e; % central stem
1668 % prepare for the top horizontal bar
1669 numeric top_bar; top_bar=0.5side-medium; % half length of top bar
1670 pos3(medium,90); pos4(dslab,0);
1671 x1=x3; top y3r=h; rt x4l=x1+top_bar;
1672 bot y4=vround(h-if monospace: 2 fi vstretch*(medium+cap_jut));
1673 arm(3,4,c,serif_darkness,0);
1674 pos5(dslab,180);
1675 lft x5r=x1-top_bar;
1676 bot y5= bot y4;
1677 arm(3,5,d,serif_darkness,0);
1678 if serifs:
1679 serif(2,1,a,serif_darkness,-cap_jut);serif(2,1,b,serif_darkness,cap_jut);
1680 fi
1681 proofpcbb(2, 0.5side, 0);
1682 penlabels(1,2,3,4); endchar;
1683
1684 % \end{macrocode}
1685 % \end{macro}
1686 %
1687 % \begin{macro}{U}
1688 % The letter U. Pacioli doesn't give a U, so I have used Hoenig's U,
1689 % suitably modified for leg and serif dimensions.
1690 % \begin{macrocode}
1691
1692 cmchar "Pacioli's letter U";
1693 beginchar("U", u#+2cap_jut#+.8side#, cap_height#,0);
1694 adjust_fit(cap_serif_fit#, cap_serif_fit#);
1695 pickup tiny.nib; pos1(thick,0); pos2(thick,0); pos2'(thick,180);
1696 pos3(medium,-90); pos4(medium,0); pos5(medium,0);
1697 x1=x2; x3=.5[x1,x5]; x4=x5; x1l=w-x5r;
1698 top y1=top y5=h; y2=y4=1/3h; bot y3r=0; z2'=z2;
1699 lft x1l=hround .5u+cap_jut;
1700 filldraw stroke z1e--z2e; % left stem
1701 filldraw stroke pulled_super_arc.e(2',3,eta)
1702 & pulled_super_arc.e(3,4,eta)&z4e--z5e;
1703 if serifs: serif(1,2,a,serif_darkness,-cap_jut);
1704 serif(1,2,b,serif_darkness,cap_jut);
1705 serif(5,4,c,serif_darkness,-cap_jut); serif(5,4,d,serif_darkness,cap_jut); fi
1706 penlabels(1,2,3,4,5); endchar;
1707
1708 % \end{macrocode}
1709 % \end{macro}
1710 %
1711 % \begin{macro}{V}
1712 % The letter V.
1713 % \begin{macrocode}
1714
1715 cmchar "Pacioli's letter V";
1716 beginchar("V",u#+side#, cap_height#, 0);
1717 adjust_fit(cap_serif_fit#, cap_serif_fit#); pickup tiny.nib;
1718 pcshiftx := 0.5u;
1719 z10 = (pcshiftx+0.5side,0);
1720 numeric alpha; alpha=((0.5h-cap_jut)++(h))/(h);
1721 pos1(alpha*thick,0); pos2(alpha*thick,0);
1722 pos3(alpha*medium,0); pos4(alpha*medium,0);
1723 top y1=top y4=h; lft x1l=pcshiftx+cap_jut; x4r=x1l+side-2cap_jut;
1724 lft x2l=hround(pcshiftx+0.5side); x3r=x2l; bot y2=bot y3=0;
1725 z0=whatever[z1r,z2r]=whatever[z3l,z4l]; % notch point
1726 filldraw z0--diag_end(0,4l,1,1,4r,3r)--z2l
1727 --diag_end(2l,1l,1,1,1r,0)--cycle;
1728 if serifs: bracket:=cap_jut_factor*bracket; cap_jut:=cap_jut_factor*cap_jut;
1729 pickup tiny.nib; numeric jut_factor;
1730 if monospace: jut_factor=1; else: jut_factor=3/4; fi
1731 serif(1,2,a,.8serif_darkness,-Lrad);
1732 serif(4,3,d,.8serif_darkness,lrad);
1733 bracket:=jut_factor*bracket;
1734 serif(1,2,b,7/8 serif_darkness, jut_factor*cap_jut);
1735 serif(4,3,c,7/8 serif_darkness,-jut_factor*cap_jut); fi
1736 proofpcbb(10, 0.5side, 0);
1737 penlabels(0,1,2,3,4); endchar;
1738
1739 % \end{macrocode}
1740 % \end{macro}
1741 %
1742 % \begin{macro}{W}
1743 % The letter W. Again, Pacioli misses this out. I use a modified version
1744 % of Hoenig's W.
1745 % \begin{macrocode}
1746
1747 cmchar "Pacioli's letter W";
1748 numeric alpha;
1749 alpha=((cap_height#+cap_jut#)++(.4side#+cap_jut_factor*cap_jut#))/
1750 (cap_height#+cap_jut#);
1751 beginchar("W", 2cap_jut_factor*cap_jut#+1.6side#-alpha*thick#, cap_height#, 0);
1752 adjust_fit(.5cap_serif_fit#, cap_serif_fit#); pickup tiny.nib;
1753 mid_corr=if monospace: -apex_corr else: 1/3jut fi;
1754 pos1(alpha*thick,0); pos2(alpha*thick,0);
1755 pos3(alpha*medium,0); pos4(alpha*medium,0);
1756 pos5(alpha*thick,0); pos6(alpha*thick,0);
1757 pos7(alpha*medium,0); pos8(alpha*medium,0);
1758 numeric V_width; V_width=2cap_jut_factor*cap_jut+4/5side;
1759 if not monospace:
1760 top y1=top y4=h; lft x1l=cap_jut_factor*cap_jut; x4r=V_width-x1l;
1761 lft x2l=hround V_width/2; x3r=x2l; bot y2=bot y3=0;
1762 pair shift_amt; ypart shift_amt=0;
1763 xpart shift_amt=V_width-2cap_jut_factor*cap_jut-alpha*(thick);
1764 z0=whatever[z1r,z2r]=whatever[z3l,z4l]; % notch point
1765 path p; p=z0--diag_end(0,4l,1,1,4r,3r)--z2l
1766 --diag_end(2l,1l,1,1,1r,0)--cycle;
1767 filldraw p; filldraw (p shifted shift_amt); % the 2 V's
1768 forsuffixes t=1,2,3,4: z[t+4]=z.t shifted shift_amt; endfor
1769 else: top y1=h; lft x1l=cap_jut_factor*cap_jut; bot y2=bot y3=0;
1770 x2l+apex_corr=x3l;
1771 x8=w-x1; y8=y1; x2-x1=x4-x3=x6-x5=x8-x7;
1772 x6l+apex_corr=x7l; y6=y7=y2;
1773 y4:=vround .6h; y5=y4;
1774 x5=x4;
1775 y4l:=y4r:=y4; % ??
1776 z0 =whatever[z1r,z2r];
1777 z0'=whatever[z7l,z8l]; y0=y0'=h/9;
1778 z45=whatever[z3r,z4r]=whatever[z5l,z6l];
1779 filldraw z0--diag_end(0,4l,1,1,4r,3r)--z2l--diag_end(2l,1l,1,1,1r,0)--cycle;
1780 filldraw z0'--diag_end(0',8l,1,1,8r,7r)--z7l--diag_end(7l,5l,1,1,5r,0')
1781 --cycle; fi
1782 if serifs: bracket:=cap_jut_factor*bracket; cap_jut:=cap_jut_factor*cap_jut;
1783 pickup tiny.nib; numeric jut_factor;
1784 if monospace: jut_factor=1.8; else: jut_factor=3/4; fi
1785 serif(1,2,a,.8serif_darkness,-cap_jut);
1786 serif(8,7,f,.8serif_darkness,cap_jut);
1787 if not monospace: serif(5,6,d,.8serif_darkness,cap_jut);
1788 serif(5,6,c,.8serif_darkness,-cap_jut); fi
1789 bracket:=jut_factor*bracket;
1790 serif(1,2,b,7/8 serif_darkness, jut_factor*cap_jut);
1791 serif(8,7,e,7/8 serif_darkness,-jut_factor*cap_jut);
1792 fi
1793 penlabels(0,0',1,2,3,4,5,6,7,8,45); endchar;
1794
1795 % \end{macrocode}
1796 % \end{macro}
1797 %
1798 % \begin{macro}{X}
1799 % The letter X.
1800 % \begin{macrocode}
1801
1802 cmchar "Pacioli's letter X";
1803 beginchar("X", u#+side#, cap_height#, 0);
1804 adjust_fit(cap_serif_fit#, cap_serif_fit#);
1805 pcshiftx := 0.5u;
1806 z10=(pcshiftx+0.5side, 0.5side); % center of the square
1807 numeric alpha; alpha=(h++(h-2thick))/h;
1808 penpos1(alpha*thick,0); penpos4(alpha*thick,0);
1809 penpos2(alpha*medium,0); penpos3(alpha*medium,0);
1810 lft x3l = pcshiftx+thick; y3=0; y2=side;
1811 0.5[z3l,z2l]=z10;
1812 y4 = 0; y1 = side;
1813 lft x1l = pcshiftx+1.5thick;
1814 0.5[z4l,z1l]=z10;
1815 filldraw z1l--z1r--z4r--z4l--cycle; % draw the thick limb
1816 filldraw z2l--z2r--z3r--z3l--cycle; % draw the other limb
1817 if serifs: bracket:=cap_jut_factor*bracket; cap_jut:=cap_jut_factor*cap_jut;
1818 pickup tiny.nib; numeric jut_factor;
1819 if monospace: cap_jut:=.5cap_jut; jut_factor=1; else: jut_factor=3/4; fi
1820 serif(1,4,a,.8serif_darkness,-Lrad);
1821 serif(4,1,d,.8serif_darkness,cap_jut);
1822 serif(2,3,f,.8serif_darkness,cap_jut);
1823 serif(3,2,g,.8serif_darkness,-lrad);
1824 bracket:=jut_factor*bracket;
1825 serif(1,4,b,7/8 serif_darkness,.75cap_jut);
1826 serif(4,1,c,7/8 serif_darkness,-.75cap_jut);
1827 serif(2,3,e,7/8 serif_darkness,-.75cap_jut);
1828 serif(3,2,h,7/8 serif_darkness,.75cap_jut); fi
1829 proofpcbb(10, 0.5side, 0.5side);
1830 penlabels(1,2,3,4); endchar;
1831
1832 % \end{macrocode}
1833 % \end{macro}
1834 %
1835 % \begin{macro}{Y}
1836 % The letter Y.
1837 % \begin{macrocode}
1838
1839 cmchar "Pacioli's letter Y";
1840 beginchar("Y", u#+side#, cap_height#, 0);
1841 adjust_fit(cap_serif_fit#, cap_serif_fit#); pickup pencircle scaled 0pt;
1842 pcshiftx := 0.5u;
1843 z100 = (pcshiftx+0.5side,0.5side); % center of the square
1844 numeric alpha, long, short, hypot; long=h/2;
1845 short=0.5side-thick;
1846 hypot=long++short; alpha=hypot/long;
1847 penpos1(alpha*thick,0);
1848 lft x1l=pcshiftx+thick;
1849 top y1=h;
1850 penpos4(alpha*medium,0); y4=y1; x4r=x1l+side-2thick;
1851 penpos2(alpha*thick,0); penpos3(alpha*medium,0);
1852 y2 = y3 = 0.5side;
1853 penpos5(thick,0); penpos6(thick,0);
1854 z2l = z3r = z100;
1855 z6 = (pcshiftx+0.5side,0);
1856 z5 = (x6,side);
1857 z0=whatever[z1r, z2r]=whatever[z3l,z4l]; % notch point
1858 z7=whatever[z6l,z5l] = whatever[z2l,z1l]; % left stem and V
1859 z8=whatever[z6r,z5r] = whatever[z3r,z4r]; % right stem and V
1860 filldraw z1r--z0--z4l--z4r--z8--z6r--z6l--z7--z1l--cycle;
1861 if serifs: numeric jut_factor;
1862 serif(6,5,e,serif_darkness,-cap_jut); serif(6,5,f,serif_darkness,cap_jut);
1863 bracket:=cap_jut_factor*bracket; cap_jut:=cap_jut_factor*cap_jut;
1864 if monospace: cap_jut:=.5cap_jut; jut_factor=1; else: jut_factor=3/4; fi
1865 % top outer serifs
1866 serif(1,2,a,serif_darkness,-lrad);serif(4,3,d,serif_darkness,lrad);
1867 bracket:=jut_factor*bracket;
1868 if monospace: cap_jut:=1.5cap_jut; fi
1869 % top inner serifs
1870 serif(1,2,b,7/8 serif_darkness,.6cap_jut);
1871 serif(4,3,c,7/8 serif_darkness,-.6cap_jut);
1872 fi
1873 proofpcbb(100, 0.5side, 0.5side);
1874 penlabels(0,1,2,3,4,5,6); endchar; % End of "Y"
1875
1876 % \end{macrocode}
1877 % \end{macro}
1878 %
1879 % \begin{macro}{Z}
1880 % The letter Z. The last of the letters that Pacioli doesn't describe.
1881 % Again, use a modifed D\"{u}rer Z.
1882 % \begin{macrocode}
1883
1884 cmchar "Pacioli's letter Z";
1885 beginchar("Z", 2u#+.8side#, cap_height#,0);
1886 adjust_fit(0, 0); pickup tiny.nib;
1887 pcshiftx := u;
1888 numeric alpha, long, short, hypot;
1889 long=h; short=w-2u-thick; hypot=long++short;
1890 alpha=hypot/long;
1891 pos1(medium,90); pos2(medium,90); pos3(alpha*thick, 0);
1892 pos4(alpha*thick, 0); pos5(medium,-90); pos6(medium,-90);
1893 rt x3r=w-u; top y3=h; x4l=w-x3r; bot y4=0;
1894 top y1r=h; lft x1=u; y2=y1; rt x2=x3;
1895 bot y5r=bot y6r=0; lft x5=x4; rt x6=w-u;
1896 filldraw stroke z1e--z2e; % top bar
1897 filldraw stroke z3e--z4e; % diagonal
1898 filldraw stroke z5e--z6e; % bottom bar
1899 z100 = (0.5(x1+x3r),0.5side); % center of square
1900 if serifs: pickup crisp.nib; % prepare for arms and serifs
1901 pos7(medium, 90); pos8(dslab,180); z7=z2; lft x8r=u;
1902 bot y8=h-if monospace:2 fi vstretch*thick;
1903 arm(7,8,a,serif_darkness,0); % upper dropped serif
1904 pos9(medium,-90); z9=z5; pos10(dslab,0); rt x10r=w-u;
1905 top y10=if monospace: 2.5 fi vstretch*thick;
1906 arm(9,10,b,serif_darkness,0); fi
1907 proofpcbb(100, 0.5side, 0.5side);
1908 penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
1909
1910
1911 %</maj>
1912 % \end{macrocode}
1913 % \end{macro}
1914 %
1915 % \subsection{The punctuation file}
1916 %
1917 % This is essentially a copy of Knuth's Computer Modern Roman punctuation
1918 % file \Lpack{punct.mf}.
1919 %
1920 % \begin{macrocode}
1921 %<*punct>
1922 % CPCPUNCT.MF This file contains punctuation marks common to
1923 % Pacioli roman and italic styles.
1924
1925 % \end{macrocode}
1926 %
1927 % \begin{macro}{!}
1928 % The ! character.
1929 % \begin{macrocode}
1930
1931 cmchar "Exclamation point";
1932 beginchar("!",5u#+width_adj#,asc_height#,0);
1933 italcorr asc_height#*slant-2u#-.5width_adj#+.5dot_size#;
1934 adjust_fit(0,0);
1935 pickup tiny.nib; pos3(dot_size,0); pos4(dot_size,90);
1936 lft x3l=hround(.5w-.5dot_size); bot y4l=0; z3=z4; dot(3,4); % dot
1937 numeric bot_width;
1938 bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
1939 pickup fine.nib; pos1(dot_size,0); pos2(bot_width,0);
1940 x1=x2=x3; bot y2=.25[top y4r,x_height]+1;
1941 if square_dots: top y1=h;
1942 filldraw stroke z1e--z2e; % stem
1943 else: top z0=(x1,h+o); y1+.5dot_size=h+o;
1944 filldraw z1r...z0...z1l---z2l--z2r---cycle; fi % stem and bulb
1945 penlabels(0,1,2,3,4); endchar;
1946
1947 % \end{macrocode}
1948 % \end{macro}
1949 %
1950 % \begin{macro}{'}
1951 % The ' character.
1952 % \begin{macrocode}
1953
1954 cmchar "Apostrophe";
1955 beginchar("'",5u#,asc_height#,0);
1956 italcorr asc_height#*slant+.5dot_size#-2u#;
1957 adjust_fit(0,0);
1958 x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h;
1959 if monospace: comma(1,a,dot_size,.28u,vround 1.5comma_depth); % large comma
1960 else: comma(1,a,dot_size,.25u,comma_depth); fi % comma with increased jut
1961 penlabels(1); endchar;
1962
1963 % \end{macrocode}
1964 % \end{macro}
1965 %
1966 % \begin{macro}{(}
1967 % The ( character.
1968 % \begin{macrocode}
1969
1970 cmchar "Left parenthesis";
1971 beginchar("(",7u# if monospace: -u# fi,body_height#,paren_depth#);
1972 italcorr body_height#*slant-.5u#;
1973 adjust_fit(0,0); pickup fine.nib;
1974 pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0);
1975 rt x1r=rt x3r=hround(w-u); lft x2l=hround(x1-4u if monospace: +4/3u fi);
1976 top y1=h; y2=.5[y1,y3]=math_axis;
1977 filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e
1978 ...{3(x3e-x2e),y3-y2}z3e; % arc
1979 penlabels(1,2,3); endchar;
1980
1981 % \end{macrocode}
1982 % \end{macro}
1983 %
1984 % \begin{macro}{)}
1985 % The ) character.
1986 % \begin{macrocode}
1987
1988 cmchar "Right parenthesis";
1989 beginchar(")",7u# if monospace: -u# fi,body_height#,paren_depth#);
1990 italcorr math_axis#*slant-.5u#;
1991 adjust_fit(0,0); pickup fine.nib;
1992 pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0);
1993 lft x1l=lft x3l=hround u; rt x2r=hround(x1+4u if monospace: -4/3u fi);
1994 top y1=h; y2=.5[y1,y3]=math_axis;
1995 filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e
1996 ...{3(x3e-x2e),y3-y2}z3e; % arc
1997 penlabels(1,2,3); endchar;
1998
1999 % \end{macrocode}
2000 % \end{macro}
2001 %
2002 % \begin{macro}{,}
2003 % The , character.
2004 % \begin{macrocode}
2005
2006 cmchar "Comma";
2007 numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
2008 define_whole_blacker_pixels(dot_diam);
2009 beginchar(",",5u#,dot_diam#,comma_depth#);
2010 adjust_fit(0,0);
2011 x1-.5dot_diam=hround(.5w-.5dot_diam); y1-.5dot_diam=0;
2012 comma(1,a,dot_diam,.2u,comma_depth); % dot and tail
2013 penlabels(1); endchar;
2014
2015 % \end{macrocode}
2016 % \end{macro}
2017 %
2018 % \begin{macro}{.}
2019 % The . character.
2020 % \begin{macrocode}
2021
2022 cmchar "Period";
2023 numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
2024 define_whole_blacker_pixels(dot_diam);
2025 beginchar(".",5u#,dot_diam#,0);
2026 adjust_fit(0,0); pickup fine.nib;
2027 pos1(dot_diam,0); pos2(dot_diam,90);
2028 lft x1l=hround(.5w-.5dot_diam); bot y2l=0; z1=z2; dot(1,2); % dot
2029 penlabels(1,2); endchar;
2030
2031 % \end{macrocode}
2032 % \end{macro}
2033 %
2034 % \begin{macro}{/}
2035 % The / character.
2036 % \begin{macrocode}
2037
2038 cmchar "Virgule (slash)";
2039 beginchar("/",9u#,body_height#,paren_depth#);
2040 italcorr body_height#*slant-.5u#;
2041 adjust_fit(0,0); pickup rule.nib;
2042 rt x1=hround(w-u)+eps; top y1=h+eps;
2043 lft x2=hround u-eps; bot y2=-d-eps;
2044 draw z1--z2; % diagonal
2045 penlabels(1,2); endchar;
2046
2047 % \end{macrocode}
2048 % \end{macro}
2049 %
2050 % \begin{macro}{:}
2051 % The : character.
2052 % \begin{macrocode}
2053
2054 cmchar "Colon";
2055 numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
2056 define_whole_blacker_pixels(dot_diam);
2057 beginchar(":",5u#,x_height#,0);
2058 italcorr x_height#*slant+.5dot_diam#-2u#;
2059 adjust_fit(0,0); pickup fine.nib;
2060 pos1(dot_diam,0); pos2(dot_diam,90);
2061 lft x1l=hround(.5w-.5dot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot
2062 pos3(dot_diam,0); pos4(dot_diam,90);
2063 x3=x1; bot y4l=0; z3=z4; dot(3,4); % lower dot
2064 penlabels(1,2,3,4); endchar;
2065
2066 % \end{macrocode}
2067 % \end{macro}
2068 %
2069 % \begin{macro}{;}
2070 % The ; character.
2071 % \begin{macrocode}
2072
2073 cmchar "Semicolon";
2074 numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
2075 define_whole_blacker_pixels(dot_diam);
2076 beginchar(";",5u#,x_height#,comma_depth#);
2077 italcorr x_height#*slant+.5dot_diam#-2u#;
2078 adjust_fit(0,0); pickup fine.nib;
2079 pos1(dot_diam,0); pos2(dot_diam,90);
2080 lft x1l=hround(.5w-.5dot_diam); top y2r=h; z1=z2; dot(1,2); % upper dot
2081 x3-.5dot_diam=hround(.5w-.5dot_diam); y3-.5dot_diam=0;
2082 comma(3,a,dot_diam,.05u,comma_depth); % lower dot and tail
2083 penlabels(1,2,3); endchar;
2084
2085 % \end{macrocode}
2086 % \end{macro}
2087 %
2088 % \begin{macro}{[}
2089 % The [ character.
2090 % \begin{macrocode}
2091
2092 cmchar "Left bracket";
2093 numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi);
2094 beginchar("[",wd#,body_height#,paren_depth#);
2095 italcorr body_height#*slant;
2096 adjust_fit(0,0);
2097 numeric top_thickness,side_thickness;
2098 if hefty: top_thickness=vair;
2099 side_thickness=max(crisp.breadth,stem-2stem_corr);
2100 else: top_thickness=side_thickness=rule_thickness; fi;
2101 pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0);
2102 top y1=h; bot y2=-d; lft x1l=lft x2l=hround(2.5u-.5side_thickness)-1-eps;
2103 filldraw stroke z1e--z2e; % stem
2104 pos3(top_thickness,90); pos4(top_thickness,90);
2105 pos5(top_thickness,90); pos6(top_thickness,90);
2106 x3=x5=x1l; rt x4=rt x6=ceiling(w-.4u)+eps; y3r=y4r=y1; y5l=y6l=y2;
2107 filldraw stroke z3e--z4e; % upper bar
2108 filldraw stroke z5e--z6e; % lower bar
2109 penlabels(1,2,3,4,5,6); endchar;
2110
2111 % \end{macrocode}
2112 % \end{macro}
2113 %
2114 % \begin{macro}{]}
2115 % The ] character.
2116 % \begin{macrocode}
2117
2118 cmchar "Right bracket";
2119 numeric wd#; wd#=max(5u#,4.5u#+.5if hefty:stem# else:rule_thickness# fi);
2120 beginchar("]",wd#,body_height#,paren_depth#);
2121 italcorr body_height#*slant-2u#+.5if hefty:stem# else:rule_thickness# fi;
2122 adjust_fit(0,0);
2123 numeric top_thickness,side_thickness;
2124 if hefty: top_thickness=vair;
2125 side_thickness=max(crisp.breadth,stem-2stem_corr);
2126 else: top_thickness=side_thickness=rule_thickness; fi;
2127 pickup crisp.nib; pos1(side_thickness,0); pos2(side_thickness,0);
2128 top y1=h; bot y2=-d; rt x1r=rt x2r=hround(w-2.5u+.5side_thickness)+1+eps;
2129 filldraw stroke z1e--z2e; % stem
2130 pos3(top_thickness,90); pos4(top_thickness,90);
2131 pos5(top_thickness,90); pos6(top_thickness,90);
2132 x3=x5=x1r; lft x4=lft x6=floor .4u-eps; y3r=y4r=y1; y5l=y6l=y2;
2133 filldraw stroke z3e--z4e; % upper bar
2134 filldraw stroke z5e--z6e; % lower bar
2135 penlabels(1,2,3,4,5,6); endchar;
2136
2137 % \end{macrocode}
2138 % \end{macro}
2139 %
2140 % \begin{macro}{`}
2141 % The ` character.
2142 % \begin{macrocode}
2143
2144 cmchar "Reverse apostrophe";
2145 beginchar("`",5u#,asc_height#,0);
2146 italcorr asc_height#*slant+.5dot_size#-2u#;
2147 adjust_fit(0,0);
2148 x1-.5dot_size=hround(.5w-.5dot_size); y1+.5dot_size=h-comma_depth;
2149 if monospace: ammoc(1,a,dot_size,.28u,vround 1.5comma_depth); % large ammoc
2150 else: ammoc(1,a,dot_size,.25u,comma_depth); fi % normal ammoc
2151 penlabels(1); endchar;
2152
2153
2154 %</punct>
2155 % \end{macrocode}
2156 % \end{macro}
2157 %
2158 %
2159 % \subsection{The ligatures and dashes file}
2160 %
2161 % This is essentially a copy of the Computer Modern \Lpack{comlig.mf} file.
2162 % \begin{macrocode}
2163 %<*lig>
2164 % CPCLIG.MF This file defines characters common to
2165 % Pacioli roman and italic text fonts
2166 % that appear only when |ligs>0|.
2167
2168 % \end{macrocode}
2169 % First the ligtables.
2170 % \begin{macrocode}
2171
2172 ligtable "`": "`"=:oct"134";
2173 ligtable "'": "'"=:oct"042", "?" kern 2u#, "!" kern 2u#;
2174
2175 ligtable "-": "-"=:oct"173";
2176 ligtable oct"173": "-"=:oct"174";
2177
2178 % \end{macrocode}
2179 %
2180 % \begin{macro}{''}
2181 % The '' ligature.
2182 % \begin{macrocode}
2183
2184 cmchar "Closing quotes";
2185 beginchar(oct"042",7u#+max(2u#,dot_size#),asc_height#,0);
2186 italcorr asc_height#*slant+dot_size#-4.1u#;
2187 adjust_fit(0,0);
2188 x1-.5dot_size=hround .6u; y2+.5dot_size=h;
2189 x2-x1=hround(1.5u+max(2u,dot_size)); y2=y1;
2190 comma(1,a,dot_size,.25u,comma_depth); % left dot and tail
2191 comma(2,b,dot_size,.25u,comma_depth); % right dot and tail
2192 penlabels(1,2); endchar;
2193
2194 % \end{macrocode}
2195 % \end{macro}
2196 %
2197 % \begin{macro}{-}
2198 % The - character.
2199 % \begin{macrocode}
2200
2201 cmchar "Hyphen";
2202 beginchar("-",6u#,x_height#,0);
2203 italcorr .5x_height#*slant-.5u#;
2204 adjust_fit(0,0);
2205 numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
2206 pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
2207 top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps;
2208 if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
2209 filldraw stroke z1e--z2e; % bar
2210 penlabels(1,2); endchar;
2211
2212 % \end{macrocode}
2213 % \end{macro}
2214 %
2215 % \begin{macro}{``}
2216 % The `` ligature.
2217 % \begin{macrocode}
2218
2219 cmchar "Opening quotes";
2220 beginchar(oct"134",7u#+max(2u#,dot_size#),asc_height#,0);
2221 italcorr asc_height#*slant-.1u#;
2222 adjust_fit(0,0);
2223 x2+.5dot_size=hround(w-.6u); y1+.5dot_size=h-comma_depth;
2224 x2-x1=hround(1.5u+max(2u,dot_size)); y2=y1;
2225 ammoc(1,a,dot_size,.25u,comma_depth); % left dot and tail
2226 ammoc(2,b,dot_size,.25u,comma_depth); % right dot and tail
2227 penlabels(1,2); endchar;
2228
2229 % \end{macrocode}
2230 % \end{macro}
2231 %
2232 % \begin{macro}{--}
2233 % The -- ligature. I think that the CM en-dash is too thin for the
2234 % Pacioli font, so I have thickened it a little.
2235 % \begin{macrocode}
2236
2237 cmchar "En dash";
2238 beginchar(oct"173",9u#,x_height#,0);
2239 italcorr .61803x_height#*slant+.5u#;
2240 adjust_fit(0,0);
2241 %%pickup crisp.nib; pos1(vair,90); pos2(vair,90);
2242 pickup crisp.nib; pos1(medium,90); pos2(medium,90);
2243 top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps;
2244 filldraw stroke z1e--z2e; % bar
2245 penlabels(1,2); endchar;
2246
2247 % \end{macrocode}
2248 % \end{macro}
2249 %
2250 % \begin{macro}{---}
2251 % The --- ligature. I think that the CM em-dash is too thin for the
2252 % Pacioli font, so I have thickened it a little.
2253 % \begin{macrocode}
2254
2255 cmchar "Em dash";
2256 beginchar(oct"174",18u#,x_height#,0);
2257 italcorr .61803x_height#*slant+.5u#;
2258 adjust_fit(letter_fit#,letter_fit#);
2259 %%pickup crisp.nib; pos1(vair,90); pos2(vair,90);
2260 pickup crisp.nib; pos1(medium,90); pos2(medium,90);
2261 top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps;
2262 filldraw stroke z1e--z2e; % bar
2263 penlabels(1,2); endchar;
2264
2265
2266 %</lig>
2267 % \end{macrocode}
2268 % \end{macro}
2269 %
2270 % \subsection{Extra punctuation}
2271 %
2272 % This is an abbreviated copy of \Lpack{romanp.mf}.
2273 % \begin{macrocode}
2274 %<*xp>
2275 % CPCROMANP.MF This file contains `\&' and `?' in the so-called roman style.
2276
2277 % \end{macrocode}
2278 %
2279 % \begin{macro}{&}
2280 % The \&{} character.
2281 % \begin{macrocode}
2282
2283 cmchar "Ampersand";
2284 beginchar("&",14u#,asc_height#,0);
2285 italcorr x_height#*slant-serif_fit# - if serifs: .4u# else: 1.5u# fi;
2286 adjust_fit(0,serif_fit#);
2287 pickup tiny.nib; pos2(slab,-90); x2=4u; bot y2r=-o;
2288 if not hefty:(x,y2l)=whatever[z2r,(w-5u,x_height)]; x2l:=x; fi
2289 if serifs: pos0(fudged.hair,0);
2290 rt x0r+jut=hround(w-.9u); top y0=x_height;
2291 pos1(fudged.hair,0); z1=whatever[z0,(.6[x0,x2],0)];
2292 y1=max(y0-1.5bracket-.2x_height,2/3x_height);
2293 filldraw stroke z0e---z1e...{left}z2e; % short diagonal
2294 else: pickup fine.nib; pos1(.25[slab,flare],-15); rt x1r=hround(w-2u);
2295 y1r=good.y .75[bar_height,x_height]; x1l:=good.x x1l; y1l:=good.y y1l;
2296 top z2'l=(x2l,tiny.top y2l); bot z2'r=(x2r,tiny.bot y2r);
2297 filldraw stroke term.e(2',1,right,1,4); fi % short diagonal and terminal
2298 pickup tiny.nib; numeric slope,theta,reduced_hair;
2299 slope=(h-2vair-slab)/10.5u; theta=angle(-slope,1);
2300 reduced_hair=max(tiny.breadth,hround(fudged.hair if hefty:-2stem_corr fi));
2301 lft x3r=hround .75u; x5=.5[x3r,x6l]; lft x6r=hround .5(w-u);
2302 x3l-x3r=curve-tiny; pos6(reduced_hair,180);
2303 pos5(vair,theta); y5=.5h;
2304 ellipse_set(2l,3l,4l,5l); ellipse_set(2r,3r,4r,5r);
2305 pos7(vair,270); top y7l=h+o; x7=.45[x6r,x8r];
2306 pos8(fudged.stem,30); x8l=good.x(x8l+3.5u-x8); y8r=y6;
2307 ellipse_set(7l,6l,5',5l);
2308 filldraw stroke z2e{left}...z3e{up}...z4e---z5e...{up}z6e
2309 ...z7e{left}...z8e{down}; % bowls
2310 pos10(slab,90); x10=w-3.5u; bot y10l=-o;
2311 pos9(fudged.stem,angle(z8-z10)-90);
2312 z9=.5[z8,z10]+(1.75u,0) rotated(angle(z8-z10)+90);
2313 filldraw stroke z8e{down}...z9e{z10-z8}...{right}z10e; % long diagonal
2314 if serifs: pickup crisp.nib; pos10'(slab,90); z10'=z10;
2315 pos11(fudged.hair,180); rt x11l=hround(w-u); y11=.5bar_height;
2316 filldraw stroke z10'e{right}...{up}z11e; % terminal
2317 numeric inner_jut; if rt x6l+.5u<lft x0l-1.5jut: inner_jut=1.5jut;
2318 else: rt x6l+.5u=lft x0l-inner_jut; fi
2319 dish_serif(0,1,a,.6,inner_jut,b,.5,jut)(dark); % serif
2320 else: pickup fine.nib; pos10'(slab,90); z10'=z10;
2321 pos11(Vround .5[slab,flare],90);
2322 rt x11=hround(r-letter_fit-u); bot y11l=vround .07bar_height-o;
2323 filldraw stroke term.e(10',11,right,1,4); fi % terminal
2324 penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
2325
2326 % \end{macrocode}
2327 % \end{macro}
2328 %
2329 % \begin{macro}{?}
2330 % The ? character. I have changed this slightly because
2331 % of the redefinition of the |pulled_super_arc| macro.
2332 % \begin{macrocode}
2333
2334 cmchar "Question mark";
2335 beginchar("?",8.5u#,asc_height#,0);
2336 italcorr .8asc_height#*slant;
2337 adjust_fit(0,0);
2338 pickup tiny.nib; pos7(dot_size,0); pos8(dot_size,90);
2339 lft x7l=hround(.5w-.25u-.5dot_size); bot y8l=0; z7=z8; dot(7,8); % dot
2340 numeric bot_width;
2341 bot_width=if hefty:max(hround .8dot_size,fine.breadth) else: hair fi;
2342 pickup fine.nib; pos2(vair,90); pos3(curve,0);
2343 pos4(vair,-90); pos5(bot_width,0); pos6(bot_width,0);
2344 x2=x4=x5=x6=x7; rt x3r=hround(w-u); bot y6=1+.25[top y8r,x_height];
2345 top y2r=h+oo; y3=.75[y6,y2]; y4=.5[y6,y2]; y5=.1[y6,y2];
2346 {{interim superness:=more_super;
2347 %%filldraw stroke pulled_super_arc.e(2,3)(superpull) % macro changed in cpctitle.mf
2348 filldraw stroke pulled_super_arc.e(2,3,eta)
2349 & subpath (0,1) of super_arc.e(3,4) .. z5e---z6e\\}}; % arc and stem
2350 if serifs: pos1(hair,180); pos0(flare,180);
2351 lft x1r=hround u; y1=y3; bulb(2,1,0); % bulb
2352 else:
2353 pos1(Vround 5/7[vair,flare],110);
2354 lft x1r=hround u; top y1r=vround .9[y6,top y2r];
2355 filldraw stroke term.e(2,1,left,1,4);
2356 fi % terminal
2357 penlabels(0,1,2,3,4,5,6,7,8); endchar;
2358
2359
2360 %</xp>
2361 % \end{macrocode}
2362 % \end{macro}
2363 %
2364 % \section{The font definition files} \label{sec:fd}
2365 %
2366 % The font definition file for the OT1 encoding.
2367 % \begin{macrocode}
2368 %<*fdot1>
2369 \DeclareFontFamily{OT1}{cpc}{}
2370 \DeclareFontShape{OT1}{cpc}{m}{n}{ <-> cpcr10 }{}
2371 \DeclareFontShape{OT1}{cpc}{bx}{n}{ <-> sub * cpc/m/n }{}
2372 \DeclareFontShape{OT1}{cpc}{b}{n}{ <-> sub * cpc/m/n }{}
2373 \DeclareFontShape{OT1}{cpc}{m}{sl}{ <-> cpcsl10 }{}
2374 \DeclareFontShape{OT1}{cpc}{m}{it}{ <-> sub * cpc/m/sl }{}
2375 %</fdot1>
2376 % \end{macrocode}
2377 %
2378 % The font definition file for the T1 encoding.
2379 % \begin{macrocode}
2380 %<*fdt1>
2381 \DeclareFontFamily{T1}{cpc}{}
2382 \DeclareFontShape{T1}{cpc}{m}{n}{ <-> cpcr10 }{}
2383 \DeclareFontShape{T1}{cpc}{bx}{n}{ <-> sub * cpc/m/n }{}
2384 \DeclareFontShape{T1}{cpc}{b}{n}{ <-> sub * cpc/m/n }{}
2385 \DeclareFontShape{T1}{cpc}{m}{sl}{ <-> cpcsl10 }{}
2386 \DeclareFontShape{T1}{cpc}{m}{it}{ <-> sub * cpc/m/sl }{}
2387 %</fdt1>
2388 % \end{macrocode}
2389 %
2390 % \section{The \Lpack{pacioli} package code} \label{sec:code}
2391 %
2392 % Announce the name and version of the package, which requires
2393 % \LaTeXe{}.
2394 % \begin{macrocode}
2395 %<*usc>
2396 \NeedsTeXFormat{LaTeX2e}
2397 \ProvidesPackage{pacioli}[1999/03/14 v1.0 package for Pacioli fonts]
2398 % \end{macrocode}
2399 %
2400 % \begin{macro}{\cpcfamily}
2401 % Selects the Pacioli font family using the OT1 encoding.
2402 % \begin{macrocode}
2403 \newcommand{\cpcfamily}{\usefont{OT1}{cpc}{m}{n}}
2404 % \end{macrocode}
2405 % \end{macro}
2406 %
2407 % \begin{macro}{\textcpc}
2408 % Text command for the Pacioli font family.
2409 % \begin{macrocode}
2410 \DeclareTextFontCommand{\textcpc}{\cpcfamily}
2411 % \end{macrocode}
2412 % \end{macro}
2413 %
2414 % The end of this package.
2415 % \begin{macrocode}
2416 %</usc>
2417 % \end{macrocode}
2418 %
2419 %
2420 % \bibliographystyle{alpha}
2421 %
2422 % \begin{thebibliography}{GMS94}
2423 %
2424 % \bibitem[GMS94]{GOOSSENS94}
2425 % Michel Goossens, Frank Mittelbach, and Alexander Samarin.
2426 % \newblock {\em The LaTeX Companion}.
2427 % \newblock Addison-Wesley Publishing Company, 1994.
2428 %
2429 % \bibitem[Mor94]{MORISON94}
2430 % Stanley Morison.
2431 % \newblock {\em Pacioli's Classic Roman Alphabet}.
2432 % \newblock Dover, 1994.
2433 %
2434 % \end{thebibliography}
2435 %
2436 %
2437 % \Finale
2438 % \PrintIndex
2439 %
2440 \endinput
2441
2442 %% \CharacterTable
2443 %% {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
2444 %% 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
2445 %% Digits \0\1\2\3\4\5\6\7\8\9
2446 %% Exclamation \! Double quote \" Hash (number) \#
2447 %% Dollar \$ Percent \% Ampersand \&
2448 %% Acute accent \' Left paren \( Right paren \)
2449 %% Asterisk \* Plus \+ Comma \,
2450 %% Minus \- Point \. Solidus \/
2451 %% Colon \: Semicolon \; Less than \<
2452 %% Equals \= Greater than \> Question mark \?
2453 %% Commercial at \@ Left bracket \[ Backslash \\
2454 %% Right bracket \] Circumflex \^ Underscore \_
2455 %% Grave accent \` Left brace \{ Vertical bar \|
2456 %% Right brace \} Tilde \~}
2457
2458