Debian Codegraph @

texmf-dist/fonts/source/public/lxfonts/llasy.mf

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