| 1 |
|
| 2 |
for scale = 1, 2, 3, 4, 5: |
| 3 |
beginsymbol(scale * 8u# + 2side_bearing#, asc_height#, 0); "wide hat"; |
| 4 |
|
| 5 |
thick := rule_thickness; |
| 6 |
thin := 1/2thick; |
| 7 |
|
| 8 |
pickup pencircle scaled thin; |
| 9 |
|
| 10 |
penpos 2(thick, 90); |
| 11 |
|
| 12 |
top y2r = h; |
| 13 |
x2 = w/2; |
| 14 |
x1 = w - x3 = -eps; |
| 15 |
y1 = y3 = 1/2[x_height, y2]; |
| 16 |
|
| 17 |
penpos 1(thin, angle(z2 - z1) + 90); |
| 18 |
penpos 3(thin, angle(z3 - z2) + 90); |
| 19 |
|
| 20 |
filldraw stroke z1e--z2e--z3e; |
| 21 |
endchar; |
| 22 |
endfor; |
| 23 |
charlist current_char - 4: current_char - 3: current_char - 2: current_char - 1: current_char; |
| 24 |
|
| 25 |
for scale = 1, 2, 3, 4, 5: |
| 26 |
beginsymbol(scale * 8u# + 2side_bearing#, asc_height#, 0); "wide tilde"; |
| 27 |
|
| 28 |
thick := rule_thickness; |
| 29 |
thin := 1/2thick; |
| 30 |
|
| 31 |
pickup pencircle scaled thin; |
| 32 |
|
| 33 |
numeric theta; |
| 34 |
theta = angle (1/6(w - thin), 1/4(h - x_height)); |
| 35 |
|
| 36 |
penpos1(thin, theta + 90); |
| 37 |
penpos2(thin, theta + 90); |
| 38 |
penpos3(thin, theta + 90); |
| 39 |
penpos4(thin, theta + 90); |
| 40 |
|
| 41 |
z2 - z1 = z4 - z3 = (thick - thin) * dir theta; |
| 42 |
|
| 43 |
lft x1r = w - rt x4l = 0; |
| 44 |
top y4r = h; |
| 45 |
bot y1l = vround(bot y1l + min(2/3[x_height, h], y3l- 1/4thin) - top y1r); |
| 46 |
|
| 47 |
pair delta; |
| 48 |
ypart delta = 3(y3l - y1l); |
| 49 |
delta = whatever * dir theta; |
| 50 |
|
| 51 |
filldraw z1l ..controls (z1l + delta) and (z3l - delta) .. z3l .. z4l |
| 52 |
-- z4r ..controls(z4r - delta) and (z2r + delta) .. z2r .. z1r -- cycle; |
| 53 |
endchar; |
| 54 |
endfor; |
| 55 |
charlist current_char - 4: current_char - 3: current_char - 2: current_char - 1: current_char; |
| 56 |
|
| 57 |
for scale = 1, 2, 3, 4, 5: |
| 58 |
beginsymbol(scale * 8u# + 2side_bearing#, asc_height#, 0); "wide paren"; |
| 59 |
|
| 60 |
thick := rule_thickness; |
| 61 |
thin := 1/2thick; |
| 62 |
|
| 63 |
pickup pencircle scaled thin; |
| 64 |
|
| 65 |
numeric theta; |
| 66 |
theta = angle (1/6(w - thin), 1/4(h - x_height)); |
| 67 |
|
| 68 |
penpos1(thin, 90 + theta); |
| 69 |
penpos2(thin, 90 + theta); |
| 70 |
penpos3(thin, 90 - theta); |
| 71 |
penpos4(thin, 90 - theta); |
| 72 |
penpos5(thin, 90); |
| 73 |
|
| 74 |
z2 - z1 = (thick - thin) * dir theta; |
| 75 |
z3 - z4 = (thick - thin) * dir (180 - theta); |
| 76 |
|
| 77 |
lft x1r = w - rt x4r = side_bearing; |
| 78 |
x5 = w/2; |
| 79 |
top y5r = h; |
| 80 |
bot y4l = vround(bot y4l - top y4r + 2/3[x_height, h]); |
| 81 |
bot y1l = vround(bot y1l - top y1r + 2/3[x_height, h]); |
| 82 |
|
| 83 |
filldraw z1l .. z2l .. z5l .. z3l .. z4l |
| 84 |
-- z4r .. z3r .. z5r .. z2r .. z1r -- cycle; |
| 85 |
endchar; |
| 86 |
endfor; |
| 87 |
charlist current_char - 4: current_char - 3: current_char - 2: current_char - 1: current_char; |
| 88 |
|
| 89 |
beginsymbol(6u# + 2side_bearing#, asc_height#, 0); "vec"; |
| 90 |
pickup pencircle scaled 2/3rule_thickness; |
| 91 |
|
| 92 |
x0 = w - x1 = side_bearing; |
| 93 |
top y0 = top y1 = h - 5/4rule_thickness; |
| 94 |
|
| 95 |
draw z0 -- z1; |
| 96 |
draw arrowhead(z1, 0, 5/2rule_thickness); |
| 97 |
endchar; |
| 98 |
|
| 99 |
|
| 100 |
beginsymbol(5u# + 2side_bearing#, 1/3asc_height#, 0); "middle bar"; |
| 101 |
|
| 102 |
penpos0(7/5rule_thickness, 70); |
| 103 |
penpos1(7/5rule_thickness, 70); |
| 104 |
|
| 105 |
x0 = w - x1 = side_bearing; |
| 106 |
y0 = y1 = h; |
| 107 |
|
| 108 |
fill stroke z0e -- z1e; |
| 109 |
endchar; |
| 110 |
|
| 111 |
beginsymbol(5u# + 2side_bearing#, 1/3asc_height#, 0); "middle slash"; |
| 112 |
|
| 113 |
penpos0(3/2rule_thickness, 70); |
| 114 |
penpos1(3/2rule_thickness, 70); |
| 115 |
|
| 116 |
x0 = w - x1 = side_bearing; |
| 117 |
1/2[y0,y1] = h; |
| 118 |
y1 - y0 = 2rule_thickness; |
| 119 |
|
| 120 |
fill stroke z0e -- z1e; |
| 121 |
endchar; |
| 122 |
|
| 123 |
beginsymbol(5u# + 2side_bearing#, 6/4asc_height#, 0); "stroke through"; |
| 124 |
pickup pencircle scaled rule_thickness; |
| 125 |
|
| 126 |
z0 = (w/2,1/6asc_height); |
| 127 |
|
| 128 |
draw (z0 - 3/4asc_height / cosd 20 * dir 70) -- (z0 + 3/4asc_height / cosd 20 * dir 70); |
| 129 |
endchar; |
| 130 |
|