Debian Codegraph @

texmf-dist/fonts/source/public/wasy/lasychr.mf

raw
1 %
2 % Copyright, The LaTeX Project and Roland Waldi, 1992.
3 %
4 % These characters are taken from LASY.MF from the LaTeX project with minor
5 % changes and extensions (so 100% compatible). LASY.MF is part of the
6 % "LaTeX fonts" package which is usually part of every LaTeX system. It
7 % is also available at the URL
8 % ftp://ftp.dante.de/tex-archive/fonts/latex/
9 %
10 % Permission is granted without fee to use, modify and distribute this
11 % file, but you are not allowed to distribute this file or any files
12 % derived from it using the name LASY.MF.
13 %
14
15 cmchar "Leftward arrowhead";
16 compute_spread(.45x_height#,.55x_height#);
17 beginchar(hex"28",6u#,v_center(spread#+rule_thickness#));
18 adjust_fit(0,0); pickup crisp.nib;
19 pos3(bar,0); pos4(bar,0);
20 y0=math_axis; lft x0=hround u;
21 y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
22 pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
23 z9=.381966[.5[z3,z4],z0];
24 numeric t[]; path p[];
25 (t1,t2)=(z4r{z9-z4}..z6r) intersectiontimes (z3r{z9-z3}..z5r);
26 z10=(z4r{z9-z4}..z6r) intersectionpoint (z3r{z9-z3}..z5r);
27 filldraw z0..{z4-z9}z4l--subpath (0,t1) of (z4r{z9-z4}..z6r)
28 --z10--subpath (t2,0) of (z3r{z9-z3}..z5r)--z3l{z9-z3}..z0 & cycle;
29 % arrowhead
30 penlabels(0,3,4,5,6,9,10); endchar;
31
32 % This character is an alteration of the leftward arrow
33 % The tip of the arrowhead rests one unit from left edge, same as left arrow
34 % Changes:
35 % 1) deletion of the stem ... points z1,z2 etc
36 % The rest of the numbers stay the same, for any referencing
37 % 2) new intersectinpoint z10 is introduced and path slightly altered
38 % 3) name, code number and width changed, otherwise essentially the same
39
40
41
42 cmchar "Rightward arrowhead";
43 compute_spread(.45x_height#,.55x_height#);
44 beginchar(hex"29",6u#,v_center(spread#+rule_thickness#));
45 adjust_fit(0,0); pickup crisp.nib;
46 pos3(bar,0); pos4(bar,0);
47 y0=math_axis; rt x0=hround(w-u);
48 y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
49 pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
50 z9=.381966[.5[z3,z4],z0];
51 numeric t[]; path p[];
52 (t1,t2)=(z4l{z9-z4}..z6r) intersectiontimes (z3l{z9-z3}..z5r);
53 z10=(z4l{z9-z4}..z6r) intersectionpoint (z3l{z9-z3}..z5r);
54 filldraw z0..{z4-z9}z4r--subpath (0,t1) of (z4l{z9-z4}..z6r)
55 --z10--subpath (t2,0) of (z3l{z9-z3}..z5r)--z3r{z9-z3}..z0 & cycle;
56 % arrowhead
57 penlabels(0,3,4,5,6,9,10); endchar;
58
59 % This character is an alteration of the rightward arrow
60 % The tip of the arrowhead rests one unit from right edge, same as right arrow
61 % Changes:
62 % 1) deletion of the stem ... points z1,z2 etc
63 % The rest of the numbers stay the same, for any referencing
64 % 2) new intersectinpoint z10 is introduced and path slightly altered
65 % 3) name, code number and width changed, otherwise essentially the same
66
67
68
69 cmchar "Upward arrowhead";
70 beginchar(hex"2A",9u#,asc_height#,asc_depth#);
71 italcorr .76asc_height#*slant+.5crisp#-u#;
72 adjust_fit(0,0); pickup crisp.nib;
73 pos3(bar,90); pos4(bar,90);
74 top z0=(.5w,0); x0-x3=x4-x0=3u+eps;
75 y3=y4=y0-.24asc_height-eps;
76 pos5(bar,angle(z4-z0)); z5l=z0;
77 pos6(bar,angle(z3-z0)); z6l=z0;
78 z9=.381966[.5[z3,z4],z0];
79 numeric t[]; path p[];
80 (t1,t2)=(z4l{z9-z4}..z6r) intersectiontimes (z3l{z9-z3}..z5r);
81 z10=(z4l{z9-z4}..z6r) intersectionpoint (z3l{z9-z3}..z5r);
82 filldraw z0..{z4-z9}z4r--subpath (0,t1) of (z4l{z9-z4}..z6r)
83 --z10--subpath (t2,0) of (z3l{z9-z3}..z5r)--z3r{z9-z3}..z0 & cycle;
84 % arrowhead
85 penlabels(0,3,4,5,6,9,10); endchar;
86
87 % This character is an alteration of the upward arrow
88 % The tip of the arrowhead rests on the baseline for reference
89 % Changes:
90 % 1) deletion of the stem ... points z1,z2 etc
91 % The rest of the numbers stay the same, for any referencing
92 % 2) point z0 is moved down from the ascender line; the tip touches
93 % the baseline
94 % 3) new intersectinpoint z10 is introduced and path slightly altered
95 % 4) name and code number changed, otherwise essentially the same
96
97
98
99 cmchar "Downward arrowhead";
100 beginchar(hex"2B",9u#,asc_height#,asc_depth#);
101 adjust_fit(0,0); pickup crisp.nib;
102 pos3(bar,90); pos4(bar,90);
103 bot z0=(.5w,0); x0-x3=x4-x0=3u+eps;
104 y3=y4=y0+.24asc_height+eps;
105 pos5(bar,angle(z4-z0)); z5l=z0;
106 pos6(bar,angle(z3-z0)); z6l=z0;
107 z9=.381966[.5[z3,z4],z0]; % z9 iintroduces curve to arrowhead
108 numeric t[]; path p[]; % rather direction{z9-z4} does this
109 (t1,t2)=(z4r{z9-z4}..z6r) intersectiontimes (z3r{z9-z3}..z5r);
110 z10=(z4r{z9-z4}..z6r) intersectionpoint (z3r{z9-z3}..z5r);
111 filldraw z0..{z4-z9}z4l--subpath (0,t1) of (z4r{z9-z4}..z6r)
112 --z10--subpath (t2,0) of (z3r{z9-z3}..z5r)--z3l{z9-z3}..z0 & cycle;
113 % arrowhead
114 penlabels(0,3,4,5,6,9,10); endchar;
115
116 % This character is an alteration of the downward arrow
117 % The tip of the arrowhead rests on the baseline for reference
118 % Changes:
119 % 1) deletion of the stem ... points z1,z2 etc
120 % The rest of the numbers stay the same, for any referencing
121 % 2) point z0 is moved up from the descender line to rest on the baseline
122 % 3) new intersectinpoint z10 is introduced and path slightly altered
123 % 4) name and code number changed, otherwise essentially the same
124
125
126 cmchar "Upside-down Uppercase Greek Omega";
127 beginchar(hex"30",13u#,cap_height#,0);
128 italcorr cap_height#*slant-.35u#; %italcorr .75cap_height#*slant-.5u#;
129 adjust_fit(0,0);
130 pickup tiny.nib; pos1(vair,-90); pos2(cap_curve,0);
131 pos3(vair,0); pos4(cap_curve,180); pos5(vair,180);
132 x1=.5w; bot y1r=0-o; lft x4r=hround u; y2=y4=1/3h; x2=w-x4;
133 rt x5l=hround(1/3(w+.5u)+.5hair); top y3=top y5=h; x3=w-x5;
134 filldraw stroke z3e{down}...{down}z2e
135 & pulled_super_arc.e(2,1)(.5superpull)
136 & pulled_super_arc.e(1,4)(.5superpull)
137 & z4e{up}...{up}z5e; % bowl
138 numeric arm_thickness; path p; p=z3{down}...{down}z2;
139 arm_thickness=Vround(if hefty:slab+2stem_corr else:.75[slab,cap_vstem] fi);
140 pickup crisp.nib; pos6(arm_thickness,90); pos7(fudged.hair,0);
141 top y6r=h; x6=x3; rt x7r=hround (w-.8u); y7=good.y(y6l-.5beak)+eps;
142 (x,y)=p intersectionpoint((0,y6l)--(w+h,y6l)); x6l:=x;
143 arm(6,7,a,.5beak_darkness,1.2beak_jut); % right arm and beak
144 pos8(arm_thickness,90); pos9(fudged.hair,180);
145 y8=y6; y9=y7; x8+x6=x9+x7=w; x8l:=w-x6l;
146 arm(8,9,b,.5beak_darkness,-1.2beak_jut); % left arm and beak
147 math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9); endchar;
148
149 % This character is taken from the Upper Case Omega of cmr
150 % Directions and reference points are reversed and flipped
151 % pos angles are flipped by 180 degrees
152 % vertical values are reversed, up/down directions in the
153 % filldraw stroke are reversed
154 % left strokes same, but changes reference points
155 % italic correction based on furthest pont of character , so made it
156 % full cap_height minus amount for the beak, taken from the cap XI
157 % I suppose a transformation of paths would have worked also, but this
158 % way, limits are maintained better, i think
159 % w+h instead of just w in intersection to make sure paths do intersect
160
161 cmchar "Square subset sign";
162 compute_spread(5/4x_height#,3/2x_height#); % the spread of `$=$'
163 beginchar(hex"3C",14u#,v_center(spread#+rule_thickness#));
164 adjust_fit(0,0); pickup rule.nib;
165 lft x2=hround(1.5u+oo); x1=x4=hround(w-1.5u)+eps; x3=x2;
166 y1-y4=spread; y2=y1; y3=y4; y1=math_axis+.5spread;
167 draw z1--z2--z3--z4; % bars and stem
168 labels(1,2,3,4); endchar;
169
170 % This character is an alteration of the square subset or equal to sign
171 % Changes:
172 % 1) changed position of y1 to be .5 of the spread above the math_axis
173 % 2) got rid of lower bar (points z8/z9,etc) and the extra spread#' amount
174 % which was used in calculations for the lower bar
175 % 3) name and code number and height changed, otherwise essentially the same
176
177 cmchar "Square superset sign";
178 compute_spread(5/4x_height#,3/2x_height#); % the spread of `$=$'
179 beginchar(hex"3D",14u#,v_center(spread#+rule_thickness#));
180 adjust_fit(0,0); pickup rule.nib;
181 x1=x4=hround 1.5u-eps; rt x2=hround(w-1.5u-oo); x3=x2;
182 y1-y4=spread; y2=y1; y3=y4; y1=math_axis+.5spread;
183 draw z1--z2--z3--z4; % bars and stem
184 labels(1,2,3,4); endchar;
185
186 % This character is an alteration of the square superset or equal to sign
187 % Changes:
188 % 1) changed position of y1 to be .5 of the spread above the math_axis
189 % 2) got rid of lower bar (points z8/z9,etc) and the extra spread#' amount
190 % which was used in calculations for the lower bar
191 % 3) name and code number and height changed, otherwise essentially the same
192
193 cmchar "Diamond";
194 %beginchar(oct"063",2(.85asc_height#-math_axis#)+2u#,v_center(7u#));
195 beginchar(hex"33",2(.85asc_height#-math_axis#)+2u#,
196 v_center(2(.85asc_height#-math_axis#)));
197 italcorr math_axis#*slant;
198 adjust_fit(0,0); pickup rule.nib;
199 numeric a; a=.85asc_height-math_axis;
200 x4=x8=good.x .5w; w:=r:=2x4; rt x2=w-lft x6=good.x(x4+a);
201 y2=y6=.5[y4,y8]=.5cap_height; top y8=good.y(y2+a);
202 draw z2--z4--z6--z8--cycle;
203 labels(2,4,6,8); endchar;
204
205 % This character is an alteration of the diamond operator
206 % The four tips are equidistant from the center point (.5w,math_axis),
207 % this distance being half of the cap height
208 % and related to that in the square character
209 % slightly less though, since it looks too big if the actually have same
210 % length
211 % Changes:
212 % 1) To the amount a, which gives the distance of the tips from the center
213 % 2) The width is related to the asc_height, so it changes with it
214 % 3) name and code number and width changed, otherwise essentially the same
215 % The numbers stay the same, for any referencing
216
217 cmchar "Bowtie operator";
218 beginchar(hex"31",13u#,v_center(7u#));
219 italcorr math_axis#*slant;
220 adjust_fit(0,0); pickup rule.nib;
221 numeric a; a=round(1.1*math_axis);
222 x1=x4=good.x 1.5u; x2=x3=w-x1;
223 y1=y2=good.y(.5(cap_height-2a)); y3=y4=y1+2a;
224 draw z1--z3--z2--z4--cycle;
225 labels(1,2,3,4); endchar;
226
227 % Arbitrary width given
228 % Length of the bars at the edges are 2.2*math_axis length
229 % and it's vertically aligned on the high, i.e., .5 cap height as opposed
230 % to being aligned on the math axis
231
232
233
234
235 cmchar "Leads to character extension";
236 compute_spread(.45x_height#,.55x_height#);
237 beginchar(hex"3A",12u#,v_center(spread#+rule_thickness#));
238 adjust_fit(0,0); pickup rule.nib;
239 numeric a; a=round(.45math_axis);
240 y11=y13=y15=math_axis; y12-a=y14+a=good.y math_axis;
241 x11=0; x15=w; x13=.5[x11,x15]; x12=.5[x11,x13]; x14=.5[x13,x15];
242 path p; p=z12{right}...z13...z14{right};
243 draw z11{dir(-angle direction 1 of p)}...z12{right}...z13...
244 z14{right}...z15{dir(-angle direction 1 of p)};
245 penlabels(11,12,13,14,15); endchar;
246
247 % This character is an extension to fit with the Leads to character with
248 % arrowhead
249 % This character goes from edge to edge and a series of these can be linked
250 % as desired.
251 % It has 2/3 the width of that character, and if this relation is kept, the
252 % the curves should all match
253
254
255
256 cmchar "Leads to character with arrowhead";
257 compute_spread(.45x_height#,.55x_height#);
258 beginchar(hex"3B",18u#,v_center(spread#+rule_thickness#));
259 adjust_fit(0,0); pickup crisp.nib;
260 pos3(bar,0); pos4(bar,0);
261 y0=math_axis; rt x0=hround(w-u);
262 y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
263 pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
264 z9=.381966[.5[z3,z4],z0];
265 numeric t[]; path p[];
266 (t1,t2)=(z4l{z9-z4}..z6r) intersectiontimes (z3l{z9-z3}..z5r);
267 z10=(z4l{z9-z4}..z6r) intersectionpoint (z3l{z9-z3}..z5r);
268 filldraw z0..{z4-z9}z4r--subpath (0,t1) of (z4l{z9-z4}..z6r)
269 --z10--subpath (t2,0) of (z3l{z9-z3}..z5r)--z3r{z9-z3}..z0 & cycle;
270 % arrowhead
271 pickup rule.nib;
272 numeric a; a=round(.45math_axis);
273 y11=y13=y15=y16=y0; y12-a=y14+a=good.y math_axis;
274 %x11=0; x15=2/3w; z17=lft z10;
275 %x13=.5[x11,x15]; x12=.5[x11,x13]; x14=.5[x13,x15]; x16=.3[x15,x0];
276 x11=0; x15=0.7w; z17=lft z10;
277 x13=.5[x11,x15]; x12=.5[x11,x13]; x14=.5[x13,x15]; x16=.5[x15,x0];
278 path p; p=z12{right}...z13...z14{right};
279 draw z11{dir(-angle direction 1 of p)}...
280 z12{right}...z13...z14{right}...z16{right}...z17;
281 penlabels(0,3,4,5,6,9,10,11,12,13,14,15,16); endchar;
282
283 % This character uses the rightward arrow arrowhead
284 % The width is the same as that of the regular arrow
285 % An extension character can be added for longer squiggles
286
287
288 cmchar "LASY \lhd triangle";
289 compute_spread(5/4x_height#,3/2x_height#);
290 beginchar(1,14u#,v_center(spread#+rule_thickness#));
291 italcorr h#*slant-u#;
292 adjust_fit(0,0); pickup rule.nib;
293 lft x2=hround 1.5u-eps; x1=x3=w-x2;
294 y1-y3=spread; y2=.5[y1,y3]=math_axis;
295 draw z1--z2--z3--cycle; % triangle
296 labels(1,2,3); endchar;
297
298 % taken directly from CMR "less than" character
299 % the path was closed to make a triangle
300
301 cmchar "black LASY \lhd triangle";
302 compute_spread(5/4x_height#,3/2x_height#);
303 beginchar(16,14u#,v_center(spread#+rule_thickness#));
304 italcorr h#*slant-u#;
305 adjust_fit(0,0); pickup crisp.nib;
306 lft x2=hround 1.5u-eps; x1=x3=w-x2;
307 y1-y3=spread; y2=.5[y1,y3]=math_axis;
308 filldraw z1--z2--z3--cycle; % triangle
309 labels(1,2,3); endchar;
310
311
312 cmchar "LASY \unlhd triangle";
313 compute_spread(.45x_height#,.55x_height#);
314 spread#':=spread#; spread':=spread; % the spread of `$=$'
315 compute_spread(5/4x_height#,3/2x_height#);
316 beginchar(2,14u#,v_center(spread#'+spread#+rule_thickness#));
317 italcorr h#*slant-u#;
318 adjust_fit(0,0); pickup rule.nib;
319 lft x2=hround 1.5u-eps; x1=x3=w-x2;
320 y1-y3=spread; y2=.5[y1,y3]; top y1=h;
321 draw z1--z2--z3--cycle; % triangle
322 x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9; % bar
323 labels(1,2,3,8,9); endchar;
324
325 % taken directly from CMR "less than or equal to sign"
326 % the "less than" path was closed to make a triangle
327
328
329
330 cmchar "LASY \rhd triangle";
331 compute_spread(5/4x_height#,3/2x_height#);
332 beginchar(3,14u#,v_center(spread#+rule_thickness#));
333 italcorr math_axis#*slant-u#;
334 adjust_fit(0,0); pickup rule.nib;
335 rt x2=hround(w-1.5u)+eps; x1=x3=w-x2;
336 y1-y3=spread; y2=.5[y1,y3]=math_axis;
337 draw z1--z2--z3--cycle; % triangle
338 labels(1,2,3); endchar;
339
340 % taken directly from CMR "greater than" character
341 % the path was closed to make a triangle
342
343 cmchar "black LASY \rhd triangle";
344 compute_spread(5/4x_height#,3/2x_height#);
345 beginchar(17,14u#,v_center(spread#+rule_thickness#));
346 italcorr math_axis#*slant-u#;
347 adjust_fit(0,0); pickup crisp.nib;
348 rt x2=hround(w-1.5u)+eps; x1=x3=w-x2;
349 y1-y3=spread; y2=.5[y1,y3]=math_axis;
350 filldraw z1--z2--z3--cycle; % triangle
351 labels(1,2,3); endchar;
352
353 cmchar "LASY \unrhd triangle";
354 compute_spread(.45x_height#,.55x_height#);
355 spread#':=spread#; spread':=spread; % the spread of `$=$'
356 compute_spread(5/4x_height#,3/2x_height#);
357 beginchar(4,14u#,v_center(spread#'+spread#+rule_thickness#));
358 italcorr h#*slant-u#;
359 adjust_fit(0,0); pickup rule.nib;
360 lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
361 y1-y3=spread; y2=.5[y1,y3]; top y1=h;
362 draw z1--z2--z3--cycle; % triangle
363 x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9; % bar
364 labels(1,2,3,8,9); endchar;
365
366 % taken directly from CMR "greater than or equal to sign"
367 % the "greater than" path was closed to make a triangle
368
369 cmchar "upwards pointing black triangle";
370 compute_spread(5/4x_height#,3/2x_height#);
371 beginchar(hex"4B",spread#+rule_thickness#,v_center(11u#));
372 italcorr 0;
373 adjust_fit(0,0); pickup crisp.nib;
374 top y2= h+eps; y1=y3; y2-y1 = vround (h+d);
375 x1-x3=spread; x2=.5[x1,x3]=good.x .5w;
376 filldraw z1--z2--z3--cycle; % triangle
377 labels(1,2,3); endchar;
378
379 cmchar "downwards pointing black triangle";
380 compute_spread(5/4x_height#,3/2x_height#);
381 beginchar(hex"4C",spread#+rule_thickness#,v_center(11u#));
382 italcorr 0;
383 adjust_fit(0,0); pickup crisp.nib;
384 bot y2= (-d)-eps; y1=y3; y1-y2 = vround (h+d);
385 x1-x3=spread; x2=.5[x1,x3]=good.x .5w;
386 filldraw z1--z2--z3--cycle; % triangle
387 labels(1,2,3); endchar;
388