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
|
% THIS IS THE OFFICIAL COMPUTER MODERN SOURCE FILE romms.mf BY D E KNUTH.
% IT MUST NOT BE MODIFIED IN ANY WAY UNLESS THE FILE NAME IS CHANGED!
% This file contains special characters of ``math italic'' fonts
% that actually are not supposed to be slanted.
% Codes \0050--\0057, \0072--\0077, and \0133--\0137 are generated.
% The italic corrections are zero in all of these characters.
cmchar "Leftward top half arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"050",18u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,90); pos2(rule_thickness,90);
pos3(rule_thickness,0); pos4(rule_thickness,0);
y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
y3-y0=y0-y4=.36asc_height+eps; x3=x4=x0+4u+eps;
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
numeric t; path p; p=z4r..{2(x0-x4),y0-y4}z6r;
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
filldraw z0--(x0,y2l)--z1l{right}..{left}z1r
--subpath (t,0) of\\(z3r..{2(x0-x3),y0-y3}z5r)
--z3l..{2(x0-x3),y0-y3}cycle; % arrowhead and stem
penlabels(0,1,2,3,4,5,6); endchar;
cmchar "Leftward bottom half arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"051",18u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,90); pos2(rule_thickness,90);
pos3(rule_thickness,0); pos4(rule_thickness,0);
y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
y3-y0=y0-y4=.36asc_height+eps; x3=x4=x0+4u+eps;
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
numeric t; path p; p=z4r..{2(x0-x4),y0-y4}z6r;
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
filldraw z0{2(x4-x0),y4-y0}..z4l
--subpath (0,t) of\\(z4r..{2(x0-x4),y0-y4}z6r)
--z1l{right}..{left}z1r--(x0,y2r)--cycle; % arrowhead and stem
penlabels(0,1,2,3,4,5,6); endchar;
cmchar "Rightward top half arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"052",18u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,90); pos2(rule_thickness,90);
pos3(rule_thickness,0); pos4(rule_thickness,0);
y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
y3-y0=y0-y4=.36asc_height+eps; x3=x4=x0-4u-eps;
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
numeric t; path p; p=z4l..{2(x0-x4),y0-y4}z6r;
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
filldraw z0--(x0,y2l)--z1l{left}..{right}z1r
--subpath (t,0) of\\(z3l..{2(x0-x3),y0-y3}z5r)
--z3r..{2(x0-x3),y0-y3}cycle; % arrowhead and stem
penlabels(0,1,2,3,4,5,6); endchar;
cmchar "Rightward bottom half arrow";
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"053",18u#,v_center(spread#+rule_thickness#));
adjust_fit(0,0); pickup crisp.nib;
pos1(rule_thickness,90); pos2(rule_thickness,90);
pos3(rule_thickness,0); pos4(rule_thickness,0);
y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
y3-y0=y0-y4=.36asc_height+eps; x3=x4=x0-4u-eps;
pos5(rule_thickness,angle(z4-z0)); z5l=z0;
pos6(rule_thickness,angle(z3-z0)); z6l=z0;
numeric t; path p; p=z4l..{2(x0-x4),y0-y4}z6r;
t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
filldraw z0{2(x4-x0),y4-y0}..z4r
--subpath (0,t) of\\(z4l..{2(x0-x4),y0-y4}z6r)
--z1l{left}..{right}z1r--(x0,y2r)--cycle; % arrowhead and stem
penlabels(0,1,2,3,4,5,6); endchar;
cmchar "Left hook";
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"054",5u#,v_center(2spread#+rule_thickness#));
adjust_fit(0,0); pickup rule.nib; autorounded;
lft x2=hround u-eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]; y3=math_axis;
draw z1{left}...z2{down}...z3{right}; % hook
labels(1,2,3); endchar;
cmchar "Right hook";
compute_spread(.45x_height#,.55x_height#);
beginchar(oct"055",5u#,v_center(2spread#+rule_thickness#));
adjust_fit(0,0); pickup rule.nib; autorounded;
rt x2=hround(w-u)+eps; x1=x3=w-x2;
y1-y3=spread; y2=.5[y1,y3]; y3=math_axis;
draw z1{right}...z2{down}...z3{left}; % hook
labels(1,2,3); endchar;
cmchar "Triangle pointing right";
beginchar(oct"056",9u#,v_center(x_height#));
adjust_fit(0,0); pickup rule.nib;
numeric a,b; a=sqrt(3.14159\\ /sqrt3); % triangle area $=$ circle area
b=.5w-(rt hround u); .5[x1',x2']=.5w; x2'-x1'=a*b*sqrt3;
x1=x3=good.x x1'; x2=good.x x2';
y2=.5[y1,y3]=math_axis; y1=good.y(y2+a*b);
draw z1--z2--z3--cycle; % triangle
labels(1,2,3); endchar;
cmchar "Triangle pointing left";
beginchar(oct"057",9u#,v_center(x_height#));
adjust_fit(0,0); pickup rule.nib;
numeric a,b; a=sqrt(3.14159\\ /sqrt3); % triangle area $=$ circle area
b=.5w-(rt hround u); .5[x1',x2']=.5w; x1'-x2'=a*b*sqrt3;
x1=x3=good.x x1'; x2=good.x x2';
y2=.5[y1,y3]=math_axis; y1=good.y(y2+a*b);
draw z1--z2--z3--cycle; % triangle
labels(1,2,3); endchar;
cmchar "Period";
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
define_whole_blacker_pixels(dot_diam);
beginchar(oct"072",5u#,dot_diam#,0); % non-ASCII position
adjust_fit(0,0); pickup fine.nib;
pos1(dot_diam,0); pos2(dot_diam,90);
lft x1l=hround(.5w-.5dot_diam); bot y2l=0; z1=z2; dot(1,2); % dot
penlabels(1,2); endchar;
cmchar "Comma";
numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
define_whole_blacker_pixels(dot_diam);
beginchar(oct"073",5u#,dot_diam#,comma_depth#); % non-ASCII position
adjust_fit(0,0);
x1-.5dot_diam=hround(.5w-.5dot_diam); y1-.5dot_diam=0;
comma(1,a,dot_diam,.2u,comma_depth); % dot and tail
penlabels(1); endchar;
cmchar "Less than sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar("<",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; % diagonals
labels(1,2,3); endchar;
cmchar "Virgule (slash)";
beginchar(oct"075",9u#,body_height#,paren_depth#); % non-ASCII position
italcorr body_height#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
rt x1=hround(w-u)+eps; top y1=h+eps;
lft x2=hround u-eps; bot y2=-d-eps;
draw z1--z2; % diagonal
penlabels(1,2); endchar;
cmchar "Greater than sign";
compute_spread(5/4x_height#,3/2x_height#);
beginchar(">",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; % diagonals
labels(1,2,3); endchar;
cmchar "Five-pointed star";
beginchar(oct"077",9u#,v_center(x_height#));
adjust_fit(0,0); pickup tiny.nib;
numeric theta; theta=360/5; % degrees between points
pos0(curve,0); pos1(rule_thickness,90); x0=x1=good.x .5w;
top y1r=vround(math_axis+.5x_height+.5rule_thickness);
ypart(.5[z1,z0+(z1-z2) rotated 2theta])=math_axis;
pos2(curve,theta); pos3(rule_thickness,90+theta);
z2=z0; z3-z0=(z1-z0) rotated theta;
z4=whatever[z0l,z1r]=whatever[z2r,z3r];
filldraw for n=0 upto 4:
z0+(z1r-z0)rotated(n*theta)--z0+(z4-z0)rotated(n*theta)--endfor
cycle; % star
penlabels(0,1,2,3,4); endchar;
cmchar "Musical flat sign";
beginchar(oct"133",7u#,body_height#,0);
adjust_fit(0,0); pickup crisp.nib;
numeric light_hair; light_hair=if hefty: vair else: hair fi;
pos1(light_hair,0); pos2(light_hair,180); pos3(light_hair,0); x1=x2=x3;
pos4(.25[light_hair,curve],60); pos5(curve,0);
lft x1l=hround u; x4=.5w; rt x5r=hround(w-u);
top y1=h; bot y3=-o; top y4=x_height+o;
y2=y4-.2x_height; y5=3/4x_height;
filldraw stroke z1e--z3e; % stem
filldraw stroke z2e{up}...z4e{right}...z5e{down}
...{2(x3-x5e),y3-y5e}z3e; % bowl
penlabels(1,2,3,4,5); endchar;
cmchar "Musical natural sign";
beginchar(oct"134",7u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup crisp.nib;
numeric light_hair; light_hair=if hefty: vair else: hair fi;
pos1(light_hair,0); pos2(curve,90); pos3(curve,90);
pos4(curve,90); pos5(curve,90); pos6(light_hair,0);
rt x1r=hround 15/8u; x2=x4=x1l; x3=x5=x6r=w-x2;
y1=h+o; top y2r=0; .5[y2,y3]=0; y4-y2=y5-y3=x_height; bot y6=-d-o;
x2'=x1r; z2'=whatever[z2r,z3r]; x5'=x6l; z5'=whatever[z4l,z5l];
(x1r,y)=z1l+whatever*(z5-z4); y6l:=y6l-(y-y1r); y1r:=y;
filldraw z1l--z2l--z3l--z3r--z2'--z1r--cycle; % left stem and lower bar
filldraw z6r--z5r--z4r--z4l--z5'--z6l--cycle; % right stem and upper bar
penlabels(1,2,3,4,5,6); endchar;
cmchar "Musical sharp sign";
beginchar(oct"135",7u#,asc_height#,desc_depth#);
adjust_fit(0,0); pickup crisp.nib;
numeric light_hair; light_hair=if hefty: vair else: hair fi;
pos1(curve,90); pos2(curve,90); pos3(curve,90); pos4(curve,90);
lft x1=lft x3=hround u; x2=x4=w-x1;
top y3r=0; .5[y3,y4]=0; y1-y3=y2-y4=x_height;
filldraw stroke z1e--z2e; filldraw stroke z3e--z4e; % bars
numeric theta,hstem; theta=angle(z2-z1);
(hstem-crisp)*cosd theta=light_hair-crisp;
pos5(hstem,theta); pos6(hstem,theta); pos7(hstem,theta); pos8(hstem,theta);
lft x5l=lft x6l=hround(2u-.5light_hair); x7=x8=w-x6;
top y7l=h+o; bot y6r=-d-o; z7-z5=z8-z6=(whatever,0) rotated theta;
filldraw stroke z5e--z6e; filldraw stroke z7e--z8e; % stems
penlabels(1,2,3,4,5,6,7,8); endchar;
cmchar "Slur below (smile)";
beginchar(oct"136",18u#,v_center(.5x_height#));
adjust_fit(0,0); pickup fine.nib;
numeric light_stem; light_stem=Vround .5[vair,stem];
x1-.5hair=hround u; y1+.5hair=vround(h+.5hair); x3=w-x1; y3=y1;
pos2(light_stem,90); x2=.5w; y2l=good.y -d;
numeric theta; theta=angle((z2-z1)yscaled 3);
pos1(hair,90+theta); pos3(hair,90-theta);
filldraw z1l{dir theta}...z2l...{dir-theta}z3l
..z3r{-dir-theta}...z2r...{-dir theta}z1r..cycle; % arc
penlabels(1,2,3); endchar;
cmchar "Slur above (frown)";
beginchar(oct"137",18u#,v_center(.5x_height#));
adjust_fit(0,0); pickup fine.nib;
numeric light_stem; light_stem=Vround .5[vair,stem];
x1-.5hair=hround u; y1-.5hair=vround(-d-.5hair); x3=w-x1; y3=y1;
pos2(light_stem,90); x2=.5w; y2=good.y h;
numeric theta; theta=angle((z2-z1)yscaled 3);
pos1(hair,90+theta); pos3(hair,90-theta);
filldraw z1l{dir theta}...z2l...{dir-theta}z3l
..z3r{-dir-theta}...z2r...{-dir theta}z1r..cycle; % arc
penlabels(1,2,3); endchar;
|