summaryrefslogtreecommitdiff
path: root/fonts/wasy/lasychr.mf
blob: 0c94770291e0327ec7c9ac8733f6b5d8f46bec2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
%
% Copyright, The LaTeX Project and Roland Waldi, 1992.
%
% These characters are taken from LASY.MF from the LaTeX project with minor
% changes and extensions (so 100% compatible).  LASY.MF is part of the
% "LaTeX fonts" package which is usually part of every LaTeX system. It
% is also available at the URL
%   ftp://ftp.dante.de/tex-archive/fonts/latex/
%
% Permission is granted without fee to use, modify and distribute this
% file, but you are not allowed to distribute this file or any files
% derived from it using the name LASY.MF.
%

cmchar "Leftward arrowhead";
compute_spread(.45x_height#,.55x_height#);
beginchar(hex"28",6u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos3(bar,0); pos4(bar,0);
y0=math_axis; lft x0=hround u;
y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t[]; path p[];
(t1,t2)=(z4r{z9-z4}..z6r) intersectiontimes (z3r{z9-z3}..z5r);
z10=(z4r{z9-z4}..z6r) intersectionpoint (z3r{z9-z3}..z5r);
filldraw z0..{z4-z9}z4l--subpath (0,t1) of (z4r{z9-z4}..z6r)
 --z10--subpath (t2,0) of (z3r{z9-z3}..z5r)--z3l{z9-z3}..z0 & cycle;
  % arrowhead
penlabels(0,3,4,5,6,9,10); endchar;

% This character is an alteration of the leftward arrow
% The tip of the arrowhead rests one unit from left edge, same as left arrow
% Changes:
%   1) deletion of the stem ... points z1,z2 etc
%      The rest of the numbers stay the same, for any referencing
%   2) new intersectinpoint z10 is introduced and path slightly altered
%   3) name, code number and width changed, otherwise essentially the same



cmchar "Rightward arrowhead";
compute_spread(.45x_height#,.55x_height#);
beginchar(hex"29",6u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos3(bar,0); pos4(bar,0);
y0=math_axis; rt x0=hround(w-u);
y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t[]; path p[];
(t1,t2)=(z4l{z9-z4}..z6r) intersectiontimes (z3l{z9-z3}..z5r);
z10=(z4l{z9-z4}..z6r) intersectionpoint (z3l{z9-z3}..z5r);
filldraw z0..{z4-z9}z4r--subpath (0,t1) of (z4l{z9-z4}..z6r)
 --z10--subpath (t2,0) of (z3l{z9-z3}..z5r)--z3r{z9-z3}..z0 & cycle;
  % arrowhead
penlabels(0,3,4,5,6,9,10); endchar;

% This character is an alteration of the rightward arrow
% The tip of the arrowhead rests one unit from right edge, same as right arrow
% Changes:
%   1) deletion of the stem ... points z1,z2 etc
%      The rest of the numbers stay the same, for any referencing
%   2) new intersectinpoint z10 is introduced and path slightly altered
%   3) name, code number and width changed, otherwise essentially the same



cmchar "Upward arrowhead";
beginchar(hex"2A",9u#,asc_height#,asc_depth#);
italcorr .76asc_height#*slant+.5crisp#-u#;
adjust_fit(0,0); pickup crisp.nib;
pos3(bar,90); pos4(bar,90);
top z0=(.5w,0); x0-x3=x4-x0=3u+eps;
y3=y4=y0-.24asc_height-eps;
pos5(bar,angle(z4-z0)); z5l=z0;
pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t[]; path p[];
(t1,t2)=(z4l{z9-z4}..z6r) intersectiontimes (z3l{z9-z3}..z5r);
z10=(z4l{z9-z4}..z6r) intersectionpoint (z3l{z9-z3}..z5r);
filldraw z0..{z4-z9}z4r--subpath (0,t1) of (z4l{z9-z4}..z6r)
 --z10--subpath (t2,0) of (z3l{z9-z3}..z5r)--z3r{z9-z3}..z0 & cycle;
  % arrowhead
penlabels(0,3,4,5,6,9,10); endchar;

% This character is an alteration of the upward arrow
% The tip of the arrowhead rests on the baseline for reference
% Changes:
%   1) deletion of the stem ... points z1,z2 etc
%      The rest of the numbers stay the same, for any referencing
%   2) point z0 is moved down from the ascender line; the tip touches
%      the baseline
%   3) new intersectinpoint z10 is introduced and path slightly altered
%   4) name and code number changed, otherwise essentially the same



cmchar "Downward arrowhead";
beginchar(hex"2B",9u#,asc_height#,asc_depth#);
adjust_fit(0,0); pickup crisp.nib;
pos3(bar,90); pos4(bar,90);
bot z0=(.5w,0); x0-x3=x4-x0=3u+eps;
y3=y4=y0+.24asc_height+eps;
pos5(bar,angle(z4-z0)); z5l=z0;
pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.5[z3,z4],z0];  % z9 iintroduces curve to arrowhead
numeric t[]; path p[];    %  rather direction{z9-z4} does this
(t1,t2)=(z4r{z9-z4}..z6r) intersectiontimes (z3r{z9-z3}..z5r);
z10=(z4r{z9-z4}..z6r) intersectionpoint (z3r{z9-z3}..z5r);
filldraw z0..{z4-z9}z4l--subpath (0,t1) of (z4r{z9-z4}..z6r)
 --z10--subpath (t2,0) of (z3r{z9-z3}..z5r)--z3l{z9-z3}..z0 & cycle;
  % arrowhead
penlabels(0,3,4,5,6,9,10); endchar;

% This character is an alteration of the downward arrow
% The tip of the arrowhead rests on the baseline for reference
% Changes:
%   1) deletion of the stem ... points z1,z2 etc
%      The rest of the numbers stay the same, for any referencing
%   2) point z0 is moved up from the descender line to rest on the baseline
%   3) new intersectinpoint z10 is introduced and path slightly altered
%   4) name and code number changed, otherwise essentially the same

 
cmchar "Upside-down Uppercase Greek Omega";
beginchar(hex"30",13u#,cap_height#,0);
italcorr cap_height#*slant-.35u#;  %italcorr .75cap_height#*slant-.5u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(vair,-90); pos2(cap_curve,0);
pos3(vair,0); pos4(cap_curve,180); pos5(vair,180);
x1=.5w; bot y1r=0-o; lft x4r=hround u; y2=y4=1/3h; x2=w-x4;
rt x5l=hround(1/3(w+.5u)+.5hair); top y3=top y5=h; x3=w-x5;
filldraw stroke z3e{down}...{down}z2e
 & pulled_super_arc.e(2,1)(.5superpull)
 & pulled_super_arc.e(1,4)(.5superpull)
 & z4e{up}...{up}z5e;        % bowl
numeric arm_thickness; path p; p=z3{down}...{down}z2;
arm_thickness=Vround(if hefty:slab+2stem_corr else:.75[slab,cap_vstem] fi);
pickup crisp.nib; pos6(arm_thickness,90); pos7(fudged.hair,0);
top y6r=h; x6=x3; rt x7r=hround (w-.8u); y7=good.y(y6l-.5beak)+eps;
(x,y)=p intersectionpoint((0,y6l)--(w+h,y6l)); x6l:=x;
arm(6,7,a,.5beak_darkness,1.2beak_jut);    % right arm and beak
pos8(arm_thickness,90); pos9(fudged.hair,180);
y8=y6; y9=y7; x8+x6=x9+x7=w; x8l:=w-x6l;
arm(8,9,b,.5beak_darkness,-1.2beak_jut);  % left arm and beak
math_fit(0,.5ic#); penlabels(1,2,3,4,5,6,7,8,9); endchar;
 
% This character is taken from the Upper Case Omega of cmr
% Directions and reference points are reversed and flipped
%   pos angles are flipped by 180 degrees
%   vertical values are reversed, up/down directions in the
%     filldraw stroke are reversed
% left strokes same, but changes reference points
% italic correction based on furthest pont of character , so made it
%   full cap_height minus amount for the beak, taken from the cap XI
% I suppose a transformation of paths would have worked also, but this
%   way, limits are maintained better, i think
% w+h instead of just w in intersection to make sure paths do intersect

cmchar "Square subset sign";
compute_spread(5/4x_height#,3/2x_height#); % the spread of `$=$'
beginchar(hex"3C",14u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup rule.nib;
lft x2=hround(1.5u+oo); x1=x4=hround(w-1.5u)+eps; x3=x2;
y1-y4=spread; y2=y1; y3=y4; y1=math_axis+.5spread;
draw z1--z2--z3--z4;  % bars and stem
labels(1,2,3,4); endchar;
 
% This character is an alteration of the square subset or equal to sign
% Changes:
%   1) changed position of y1 to be .5 of the spread above the math_axis
%   2) got rid of lower bar (points z8/z9,etc) and the extra spread#' amount
%      which was used in calculations for the lower bar
%   3) name and code number and height changed, otherwise essentially the same
 
cmchar "Square superset sign";
compute_spread(5/4x_height#,3/2x_height#); % the spread of `$=$'
beginchar(hex"3D",14u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup rule.nib;
x1=x4=hround 1.5u-eps; rt x2=hround(w-1.5u-oo); x3=x2;
y1-y4=spread; y2=y1; y3=y4; y1=math_axis+.5spread;
draw z1--z2--z3--z4;  % bars and stem
labels(1,2,3,4); endchar;
 
% This character is an alteration of the square superset or equal to sign
% Changes:
%   1) changed position of y1 to be .5 of the spread above the math_axis
%   2) got rid of lower bar (points z8/z9,etc) and the extra spread#' amount
%      which was used in calculations for the lower bar
%   3) name and code number and height changed, otherwise essentially the same
 
cmchar "Diamond";
%beginchar(oct"063",2(.85asc_height#-math_axis#)+2u#,v_center(7u#));
beginchar(hex"33",2(.85asc_height#-math_axis#)+2u#,
          v_center(2(.85asc_height#-math_axis#)));
italcorr math_axis#*slant;
adjust_fit(0,0); pickup rule.nib;
numeric a; a=.85asc_height-math_axis;
x4=x8=good.x .5w; w:=r:=2x4; rt x2=w-lft x6=good.x(x4+a);
y2=y6=.5[y4,y8]=.5cap_height; top y8=good.y(y2+a);
draw z2--z4--z6--z8--cycle;
labels(2,4,6,8); endchar;
 
% This character is an alteration of the diamond operator
% The four tips are equidistant from the center point (.5w,math_axis),
%    this distance being half of the cap height
%    and related to that in the square character
%    slightly less though, since it looks too big if the actually have same
%    length
% Changes:
%   1) To the amount a, which gives the distance of the tips from the center
%   2) The width is related to the asc_height, so it changes with it
%   3) name and code number and width changed, otherwise essentially the same
%      The numbers stay the same, for any referencing
 
cmchar "Bowtie operator";
beginchar(hex"31",13u#,v_center(7u#));
italcorr math_axis#*slant;
adjust_fit(0,0); pickup rule.nib;
numeric a; a=round(1.1*math_axis);
x1=x4=good.x 1.5u; x2=x3=w-x1;
y1=y2=good.y(.5(cap_height-2a)); y3=y4=y1+2a;
draw z1--z3--z2--z4--cycle;
labels(1,2,3,4); endchar;
 
% Arbitrary width given
% Length of the bars at the edges are 2.2*math_axis length
%   and it's vertically aligned on the high, i.e., .5 cap height as opposed
%   to being aligned on the math axis
 
 
 
 
cmchar "Leads to character extension";
compute_spread(.45x_height#,.55x_height#);
beginchar(hex"3A",12u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup rule.nib;
numeric a; a=round(.45math_axis);
y11=y13=y15=math_axis; y12-a=y14+a=good.y math_axis;
x11=0; x15=w; x13=.5[x11,x15]; x12=.5[x11,x13]; x14=.5[x13,x15];
path p; p=z12{right}...z13...z14{right};
draw z11{dir(-angle direction 1 of p)}...z12{right}...z13...
     z14{right}...z15{dir(-angle direction 1 of p)};
penlabels(11,12,13,14,15); endchar;
 
% This character is an extension to fit with the Leads to character with
%   arrowhead
% This character goes from edge to edge and a series of these can be linked
%   as desired.
% It has 2/3 the width of that character, and if this relation is kept, the
%   the curves should all match
 
 
 
cmchar "Leads to character with arrowhead";
compute_spread(.45x_height#,.55x_height#);
beginchar(hex"3B",18u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos3(bar,0); pos4(bar,0);
y0=math_axis; rt x0=hround(w-u);
y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
z9=.381966[.5[z3,z4],z0];
numeric t[]; path p[];
(t1,t2)=(z4l{z9-z4}..z6r) intersectiontimes (z3l{z9-z3}..z5r);
z10=(z4l{z9-z4}..z6r) intersectionpoint (z3l{z9-z3}..z5r);
filldraw z0..{z4-z9}z4r--subpath (0,t1) of (z4l{z9-z4}..z6r)
 --z10--subpath (t2,0) of (z3l{z9-z3}..z5r)--z3r{z9-z3}..z0 & cycle;
  % arrowhead
pickup rule.nib;
numeric a; a=round(.45math_axis);
y11=y13=y15=y16=y0; y12-a=y14+a=good.y math_axis;
%x11=0; x15=2/3w; z17=lft z10;
%x13=.5[x11,x15]; x12=.5[x11,x13]; x14=.5[x13,x15]; x16=.3[x15,x0];
x11=0; x15=0.7w; z17=lft z10;
x13=.5[x11,x15]; x12=.5[x11,x13]; x14=.5[x13,x15]; x16=.5[x15,x0];
path p; p=z12{right}...z13...z14{right};
draw z11{dir(-angle direction 1 of p)}...
       z12{right}...z13...z14{right}...z16{right}...z17;
penlabels(0,3,4,5,6,9,10,11,12,13,14,15,16); endchar;
 
% This character uses the rightward arrow arrowhead
% The width is the same as that of the regular arrow
% An extension character can be added for longer squiggles
 
 
cmchar "LASY \lhd triangle";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(1,14u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup rule.nib;
lft x2=hround 1.5u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
draw z1--z2--z3--cycle;  % triangle
labels(1,2,3); endchar;
 
% taken directly from CMR "less than" character
% the path was closed to make a triangle
 
cmchar "black LASY \lhd triangle";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(16,14u#,v_center(spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup crisp.nib;
lft x2=hround 1.5u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
filldraw z1--z2--z3--cycle;  % triangle
labels(1,2,3); endchar;
 
 
cmchar "LASY \unlhd triangle";
compute_spread(.45x_height#,.55x_height#);
spread#':=spread#; spread':=spread; % the spread of `$=$'
compute_spread(5/4x_height#,3/2x_height#);
beginchar(2,14u#,v_center(spread#'+spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup rule.nib;
lft x2=hround 1.5u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]; top y1=h;
draw z1--z2--z3--cycle;  % triangle
x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % bar
labels(1,2,3,8,9); endchar;
 
% taken directly from CMR "less than or equal to sign"
% the "less than" path was closed to make a triangle
 
 
 
cmchar "LASY \rhd triangle";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(3,14u#,v_center(spread#+rule_thickness#));
italcorr math_axis#*slant-u#;
adjust_fit(0,0); pickup rule.nib;
rt x2=hround(w-1.5u)+eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
draw z1--z2--z3--cycle;  % triangle
labels(1,2,3); endchar;
 
% taken directly from CMR "greater than" character
% the path was closed to make a triangle
 
cmchar "black LASY \rhd triangle";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(17,14u#,v_center(spread#+rule_thickness#));
italcorr math_axis#*slant-u#;
adjust_fit(0,0); pickup crisp.nib;
rt x2=hround(w-1.5u)+eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]=math_axis;
filldraw z1--z2--z3--cycle;  % triangle
labels(1,2,3); endchar;
 
cmchar "LASY \unrhd triangle";
compute_spread(.45x_height#,.55x_height#);
spread#':=spread#; spread':=spread; % the spread of `$=$'
compute_spread(5/4x_height#,3/2x_height#);
beginchar(4,14u#,v_center(spread#'+spread#+rule_thickness#));
italcorr h#*slant-u#;
adjust_fit(0,0); pickup rule.nib;
lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
y1-y3=spread; y2=.5[y1,y3]; top y1=h;
draw z1--z2--z3--cycle;  % triangle
x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % bar
labels(1,2,3,8,9); endchar;
 
% taken directly from CMR "greater than or equal to sign"
% the "greater than" path was closed to make a triangle
 
cmchar "upwards pointing black triangle";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(hex"4B",spread#+rule_thickness#,v_center(11u#));
italcorr 0;
adjust_fit(0,0); pickup crisp.nib;
top y2= h+eps; y1=y3; y2-y1 = vround (h+d);
x1-x3=spread; x2=.5[x1,x3]=good.x .5w;
filldraw z1--z2--z3--cycle;  % triangle
labels(1,2,3); endchar;
 
cmchar "downwards pointing black triangle";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(hex"4C",spread#+rule_thickness#,v_center(11u#));
italcorr 0;
adjust_fit(0,0); pickup crisp.nib;
bot y2= (-d)-eps; y1=y3; y1-y2 = vround (h+d);
x1-x3=spread; x2=.5[x1,x3]=good.x .5w;
filldraw z1--z2--z3--cycle;  % triangle
labels(1,2,3); endchar;