Debian Codegraph @

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

raw
1 %%
2 %% This is file `uncltitle.mf',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% uncial.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 uncial_font_setup= % contains special stuff for uncial 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 xscaled thick yscaled thin rotated pangle;
61 quill:=savepen;
62 numeric pcshiftx#; % x value of LHS of box wrt origin of char box
63 define_pixels(pcshiftx);
64 numeric sqxside#; % x size of the square
65 numeric sqyside#; % y size of the square
66 define_pixels(sqxside,sqyside);
67
68 enddef; % end of uncial_font_setup
69
70 boolean ductus;
71 ductus:=false;
72 numeric qhor, qvert;
73 qhor:=cosd(pangle); qvert:=sind(pangle);
74 pair pdir; pdir=dir(pangle);
75 pair ppdir; ppdir=dir(pangle+90);
76
77 def draw_serif(suffix $, $$)(expr fr)=
78 numeric beta, ajut, bjut;
79 beta=1-fr;
80 ajut=fr*jut; bjut=beta*jut;
81 pair vec[]; vec1=unitvector(z$$-z$);
82 vec2=ajut*vec1;
83 z$a=z$ shifted vec2;
84 z$b=z$a rotatedaround (z$,-90);
85 boolean top_serif;
86 if y$>y$$:
87 top_serif := true;
88 z$c=z$b shifted (-bjut*pdir);
89 else:
90 top_serif:=false;
91 z$c=z$b shifted (bjut*pdir);
92 fi
93 if top_serif:
94 draw z$c--z$b{pdir}..{z$$-z$}z$a; % the serif
95 else:
96 draw z$c--z$b{-pdir}..{z$$-z$}z$a;
97 fi
98 labels($a,$b,$c);
99 enddef; % end of draw_serif
100
101
102 def draw_istem(suffix $, $$)(expr fr)=
103 draw_serif($, $$, fr); % top serif
104 draw_serif($$, $, fr); % bottom serif
105 draw z$a--z$$a; % the stem
106 enddef; % end of draw_istem
107
108
109 def draw_tstem(suffix $, $$)(expr fr)=
110 draw_serif($$, $, fr); % the serif
111 draw z$--z$$a; % the stem
112 enddef; % end of draw_tstem
113
114
115 def draw_tlserif(suffix $, $$)(expr fr)=
116 draw_serif($, $$, fr); % the serif
117 draw z$a--z$$; % the stem
118 enddef; % end of draw_tlserif
119
120
121 def draw_jstem(suffix $, $$)(expr fr, jjut, jdepth)=
122 draw_serif($, $$, fr); % the serif
123 lft x$$a=x$$-jjut; bot y$$a=y$$-jdepth;
124 draw z$a--z$${down}..{-pdir}z$$a; % straight stem and curved ending
125 labels($$a);
126 enddef; % end of draw_jstem
127
128
129 def draw_jcurve(suffix $)(expr fr, jjut, jdepth)=
130 z$'= z$ shifted down;
131 draw_serif($, $', fr); % the serif
132 lft x$d=x$-jjut; bot y$d=y$-jdepth;
133 draw z$a{down}...{-pdir}z$d; % curved downwards stem
134 labels($d);
135 enddef; % end of draw_jcurve
136
137
138 def draw_flick(suffix $)(expr rise, fall, fjut)=
139 rt x$b = x$+fjut; top y$b=y$-fall;
140 x$a=0.5[x$,x$b]; top y$a=y$+rise;
141 draw z$..z$a..z$b;
142 labels($a,$b);
143 enddef; % end of draw_flick
144
145
146 def draw_hbowl(suffix $)(expr rise, fall, fjut)=
147 numeric rad; rad=0.5(rise+fall);
148 x$c=x$+fjut-rad; y$c=y$+rise-rad;
149 lft x$d=x$c-rad; rt x$f=x$c+rad; y$d=y$f=y$c;
150 x$e=x$g=x$c; top y$e=y$c+rad; bot y$g=y$c-rad;
151 z$k = z$c shifted (-rad*ppdir);
152 path p[];
153 p1 = z$e{right}..z$f{down}..{left}z$g;
154 z$i = (z$c--z$k) intersectionpoint p1;
155 x$j=x$i; bot y$j = y$c-rad;
156 draw z$..z$e{right}..z$f{down}..{-pdir}z$j;
157 labels($c,$d,$e,$f,$g,$i,$j,$k);
158 enddef; % end of draw_hbowl
159
160
161 def draw_wave(suffix $,$$)(expr f)=
162 x$wl=x$; y$wl=y$-f;
163 x$wr=x$$; y$wr=y$$+f;
164 z$wc=0.5[z$wl,z$wr];
165 draw z$wl{pdir}..z$wc{right}..{pdir}z$wr;
166 labels($wl,$wc,$wr);
167 enddef; % end of draw_wave
168
169 def draw_pdot(suffix $)(expr sz)=
170 z$s = z$ shifted (0.5sz*left);
171 z$t = z$ shifted (0.5sz*up);
172 z$u = z$s shifted (sz*right);
173 z$v = z$t shifted (sz*down);
174 pickup stylus;
175 filldraw z$s--z$t--z$u--z$v--cycle;
176 labels($s,$t,$u,$v);
177 enddef; % end of draw_pdot
178
179
180 def draw_pcomma(suffix $)(expr sz, ar)=
181 z$s = z$ shifted (0.5sz*left);
182 z$t = z$s shifted (sz*right);
183 x$v=x$s-ar; y$v=y$s-ar;
184 z$u = z$v shifted (sz*right);
185 pickup stylus;
186 filldraw z$s--z$t--z$u--z$v--cycle;
187 labels($s,$t,$u,$v);
188 enddef; % end of draw_pcomma
189
190
191 def draw_plq(suffix $)(expr sz, ar)=
192 z$s = z$ shifted (0.5sz*left);
193 z$t = z$s shifted (sz*right);
194 x$v=x$s+ar; y$v=y$s-ar;
195 z$u = z$v shifted (sz*right);
196 pickup stylus;
197 filldraw z$s--z$t--z$u--z$v--cycle;
198 labels($s,$t,$u,$v);
199 enddef; % end of draw_plq
200
201
202 font_coding_scheme:="ASCII minuscules and punctuation";
203 mode_setup;
204 uncial_font_setup;
205
206
207 input uncll; % minuscules (lower case)
208 input unclu; % majuscules (capitals)
209 input unclpunct; % punctuation
210 input uncllig; % the several dashes
211 input uncldig; % arabic digits
212 %%%input unclp; % ampersand and ?mark
213
214
215 font_slant slant; font_x_height x_height#;
216 if monospace: font_normal_space 9u#; % no stretching or shrinking
217 font_quad 18u#;
218 font_extra_space 9u#;
219 else: font_normal_space 6u#+2letter_fit#;
220 font_normal_stretch 3u#; font_normal_shrink 2u#;
221 font_quad 18u#+4letter_fit#;
222 font_extra_space 2u#;
223 k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning
224 %% ligtable "P": "T": "Y": "A" kern kk#;
225 %% ligtable "F": "V": "W": "A" kern if serifs: kkk# else: kk#fi,
226 %% "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#;
227 %% ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#,
228 %% "V" kern k#, "Y" kern k#;
229 %% ligtable "A": if serifs: "R": fi
230 %% "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#,
231 %% "L": "T" kern kk#, "Y" kern kkk#, "V" kern kk#, "W" kern kkk#;
232 %%ligtable "I": "I" kern -k#; % Richard III
233 fi
234
235 bye.
236