Debian Codegraph @

texmf-dist/fonts/source/public/bookhands/auncltitle.mf

raw
1 %%
2 %% This is file `auncltitle.mf',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% auncial.dtx (with options: `mfd')
8 %%
9 %% Copyright 1999 Peter R. Wilson
10 %%
11 %% This program is provided under the terms of the
12 %% LaTeX Project Public License distributed from CTAN
13 %% archives in directory macros/latex/base/lppl.txt.
14 %%
15 %% Author: Peter Wilson (CUA)
16 %% now at: [email protected]
17 %%
18 def makebox(text rule) =
19 for y=0,half_height,cap_height,body_height,x_height,-desc_depth,-body_depth:
20 rule((l,y)t_,(r,y)t_); endfor % horizontals
21 for x=l,r: rule((x,-body_depth)t_,(x,body_height)t_); endfor % verticals
22 for x=u*(1+floor(1/u)) step u until r-1:
23 rule((x,-body_depth)t_,(x,body_height)t_); endfor % more verticals
24 if charic<>0:
25 rule((r+charic*pt,h.o_),(r+charic*pt,.5h.o_)); fi % italic correction
26 enddef;
27
28
29 def proofpcbb(suffix $)(expr xoff, yoff) =
30 if proofing > 0:
31 x$bl = x$ - xoff; y$bl = y$ - yoff; % Bottom Left Hand Corner
32 z$br = (x$bl+side, y$bl); % BRHC
33 z$tr = (x$bl+side, y$bl+side); % TRHC
34 z$tl = (x$bl, y$bl+side); % TLHC
35 z$bc = 1/2[z$bl,z$br]; z$tc = 1/2[z$tl,z$tr]; % horizontal mid points
36 pair hc, vc;
37 hc = (2u,0); vc = (0,2u);
38 pickup pensquare scaled 2;
39 for s = z$bl, z$br, z$tr, z$tl, z$bc, z$tc:
40 draw s-hc--s+hc;
41 draw s-vc--s+vc;
42 endfor
43 fi
44 enddef;
45
46
47 def auncial_font_setup= % contains special stuff for auncial fonts
48 define_pixels(side,half_height,carol_height,comma_width);
49 define_pixels(u,dot_size,letter_size,cap_height,width_adj,serif_fit,
50 cap_serif_fit,jut,cap_jut);
51 define_pixels(fig_width);
52 define_whole_pixels(letter_fit);
53 define_whole_vertical_pixels(body_height,asc_height,cap_height,x_height,
54 desc_depth,body_depth,fig_height);
55 define_corrected_pixels(o);
56 define_blacker_pixels(thick,thin);
57 let adjust_fit = normal_adjust_fit;
58 pickup pencircle scaled thin;
59 stylus:=savepen;
60 pickup pencircle scaled (1.5thin);
61 thickstylus:=savepen;
62 pickup pencircle xscaled thick yscaled thin rotated pangle;
63 quill:=savepen;
64 numeric pcshiftx#; % x value of LHS of box wrt origin of char box
65 define_pixels(pcshiftx);
66 numeric sqxside#; % x size of the square
67 numeric sqyside#; % y size of the square
68 define_pixels(sqxside,sqyside);
69
70 enddef; % end of auncial_font_setup
71
72 boolean ductus;
73 ductus:=false;
74 numeric qhor, qvert;
75 qhor:=cosd(pangle); qvert:=sind(pangle);
76 pair pdir; pdir=dir(pangle);
77 pair ppdir; ppdir=dir(pangle+90);
78
79 def draw_serif(suffix $, $$)(expr fr)=
80 numeric beta, ajut, bjut;
81 beta=1-fr;
82 ajut=fr*jut; bjut=beta*jut;
83 pair vec[]; vec1=unitvector(z$$-z$);
84 vec2=ajut*vec1;
85 z$a=z$ shifted vec2;
86 z$b=z$a rotatedaround (z$,-90);
87 boolean top_serif;
88 if y$>y$$:
89 top_serif := true;
90 z$c=z$b shifted (-bjut*pdir);
91 else:
92 top_serif:=false;
93 z$c=z$b shifted (bjut*pdir);
94 fi
95 if top_serif:
96 draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif
97 else:
98 draw z$c--z$b{-pdir}..{z$$-z$}z$a;
99 fi
100 labels($a,$b,$c);
101 enddef; % end of draw_serif
102
103
104 def draw_istem(suffix $, $$)(expr fr)=
105 draw_serif($, $$, fr); % top serif
106 draw_serif($$, $, fr); % bottom serif
107 draw z$a--z$$a; % the stem
108 enddef; % end of draw_istem
109
110
111 def draw_tstem(suffix $, $$)(expr fr)=
112 draw_serif($$, $, fr); % the serif
113 draw z$--z$$a; % the stem
114 enddef; % end of draw_tstem
115
116
117 def draw_tlserif(suffix $, $$)(expr fr)=
118 draw_serif($, $$, fr); % the serif
119 draw z$a--z$$; % the stem
120 enddef; % end of draw_tlserif
121
122
123 def draw_flick(suffix $)(expr rise, fall, fjut)=
124 rt x$b = x1+fjut; top y$b=y$-fall;
125 x$a=0.5[x$,x$b]; top y$a=y$+rise;
126 draw z$..z$a..z$b;
127 labels($a,$b);
128 enddef; % end of draw_flick
129
130
131 def draw_wave(suffix $,$$)(expr f)=
132 x$wl=x$; y$wl=y$-f;
133 x$wr=x$$; y$wr=y$$+f;
134 z$wc=0.5[z$wl,z$wr];
135 draw z$wl{pdir}..z$wc{right}..{pdir}z$wr;
136 labels($wl,$wc,$wr);
137 enddef; % end of draw_wave
138
139 def draw_tail(suffix $)(expr fj)=
140 pen oldpen; oldpen:=currentpen;
141 pickup quill;
142 x$tl' = lft x$; y$tl=bot y$;
143 pickup stylus;
144 lft x$tl=x$tl';
145 x$tb=x$tl-fj; bot y$tb=y$tl-1/2desc_depth;
146 filldraw z${down}..{-pdir}z$tb & z$tb{pdir}..{up}z$tl--cycle;
147 pickup oldpen;
148 labels($tb,$tl);
149 enddef; % end of draw_tail
150
151 def draw_triangle(suffix $)(expr sz)=
152 pen oldpen; oldpen:=currentpen;
153 pickup stylus;
154 x$t1=x$-sz/2; x$t3=x$+sz/2;
155 y$t1=y$t3=y$;
156 x$t2=x$; y$t2=y$-0.9sz; % approx sqrt(3)/2
157 filldraw z$t1--z$t2--z$t3--cycle;
158 pickup oldpen;
159 labels($t1,$t2,$t3);
160 enddef; % end of draw_triangle
161
162 def draw_rtriangle(suffix $)(expr sz)=
163 pen oldpen; oldpen:=currentpen;
164 pickup stylus;
165 x$t1=x$-sz; rt x$t3=x$;
166 y$t1=y$t3=y$;
167 x$t2=x$t3; y$t2=y$-sz;
168 filldraw z$t1--z$t2--z$t3--cycle;
169 pickup oldpen;
170 labels($t1,$t2,$t3);
171 enddef; % end of draw_rtriangle
172
173 def draw_rutriangle(suffix $)(expr sz)=
174 pen oldpen; oldpen:=currentpen;
175 pickup stylus;
176 x$t1=x$-sz; rt x$t3=x$;
177 y$t1=y$t3=y$;
178 x$t2=x$t3; y$t2=y$+sz;
179 filldraw z$t1--z$t2--z$t3--cycle;
180 pickup oldpen;
181 labels($t1,$t2,$t3);
182 enddef; % end of draw_rutriangle
183
184 def draw_fork(suffix $, $$)(expr sz)=
185 pen oldpen; oldpen:=currentpen;
186 pickup quill;
187 x$f1'=lft x$; y$f1'=bot y$;
188 x$f3'=rt x$; y$f3'=top y$;
189 pickup stylus;
190 lft x$f1=x$f1'; bot y$f1=y$f1';
191 rt x$f3=x$f3'; y$f3-y$=2*(y$-y$f1);
192 rt x$f2=x$$-sz; bot y$f2=y$$;
193 rt x$f4= rt x$f5=x$$;
194 bot y$f5=y$$-sz; top y$f4=y$$+1/2sz;
195 filldraw z$f1--z$f2--z$f3--cycle; % the line
196 draw z$f2{right}..z$f4; % upper fork
197 draw z$f2{right}..z$f5; % lower fork
198 pickup oldpen;
199 labels($f1,$f2,$f3,$f4,$f5);
200 enddef; % end of draw_fork
201
202 def draw_pdot(suffix $)(expr sz)=
203 z$s = z$ shifted (0.5sz*left);
204 z$t = z$ shifted (0.5sz*up);
205 z$u = z$s shifted (sz*right);
206 z$v = z$t shifted (sz*down);
207 pickup stylus;
208 filldraw z$s--z$t--z$u--z$v--cycle;
209 labels($s,$t,$u,$v);
210 enddef; % end of draw_pdot
211
212
213 def draw_pcomma(suffix $)(expr sz, ar)=
214 z$s = z$ shifted (0.5sz*left);
215 z$t = z$s shifted (sz*right);
216 x$v=x$s-ar; y$v=y$s-ar;
217 z$u = z$v shifted (sz*right);
218 pickup stylus;
219 %% filldraw z$s--z$t--z$u--z$v--cycle;
220 filldraw z$s--z$t--z$u--cycle;
221 labels($s,$t,$u,$v);
222 enddef; % end of draw_pcomma
223
224
225 def draw_plq(suffix $)(expr sz, ar)=
226 z$s = z$ shifted (0.5sz*left);
227 z$t = z$s shifted (sz*right);
228 x$v=x$s+ar; y$v=y$s-ar;
229 z$u = z$v shifted (sz*right);
230 pickup stylus;
231 %% filldraw z$s--z$t--z$u--z$v--cycle;
232 filldraw z$s--z$t--z$v--cycle;
233 labels($s,$t,$u,$v);
234 enddef; % end of draw_plq
235
236
237 font_coding_scheme:="ASCII minuscules and punctuation";
238 mode_setup;
239 auncial_font_setup;
240
241
242 input auncll; % minuscules (lower case)
243 input aunclu; % majuscules (capitals)
244 input aunclpunct; % punctuation
245 input auncllig; % the several dashes
246 input auncldig; % arabic digits
247 %%%input aunclp; % ampersand and ?mark
248
249
250 font_slant slant; font_x_height x_height#;
251 if monospace: font_normal_space 9u#; % no stretching or shrinking
252 font_quad 18u#;
253 font_extra_space 9u#;
254 else: font_normal_space 6u#+2letter_fit#;
255 font_normal_stretch 3u#; font_normal_shrink 2u#;
256 font_quad 18u#+4letter_fit#;
257 font_extra_space 2u#;
258 k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning
259 %% ligtable "P": "T": "Y": "A" kern kk#;
260 %% ligtable "F": "V": "W": "A" kern if serifs: kkk# else: kk#fi,
261 %% "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#;
262 %% ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#,
263 %% "V" kern k#, "Y" kern k#;
264 %% ligtable "A": if serifs: "R": fi
265 %% "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#,
266 %% "L": "T" kern kk#, "Y" kern kkk#, "V" kern kk#, "W" kern kkk#;
267 %%ligtable "I": "I" kern -k#; % Richard III
268 fi
269
270 bye.
271