summaryrefslogtreecommitdiff
path: root/fonts/mnsymbol/source/Sym-Accent.mf
blob: 5b055234f8d534513ad9dffa355a089697b0103b (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

for scale = 1, 2, 3, 4, 5:
  beginsymbol(scale * 8u# + 2side_bearing#, asc_height#, 0); "wide hat";

    thick := rule_thickness;
    thin  := 1/2thick;

    pickup pencircle scaled thin;

    penpos 2(thick, 90);

    top y2r = h;
    x2 = w/2;
    x1 = w - x3 = -eps;
    y1 = y3 = 1/2[x_height, y2];

    penpos 1(thin, angle(z2 - z1) + 90);
    penpos 3(thin, angle(z3 - z2) + 90);

    filldraw stroke z1e--z2e--z3e;
  endchar;
endfor;
charlist current_char - 4: current_char - 3: current_char - 2: current_char - 1: current_char;

for scale = 1, 2, 3, 4, 5:
  beginsymbol(scale * 8u# + 2side_bearing#, asc_height#, 0); "wide tilde";

    thick := rule_thickness;
    thin  := 1/2thick;

    pickup pencircle scaled thin;

    numeric theta;
    theta = angle (1/6(w - thin), 1/4(h - x_height));

    penpos1(thin, theta + 90);
    penpos2(thin, theta + 90);
    penpos3(thin, theta + 90);
    penpos4(thin, theta + 90);

    z2 - z1 = z4 - z3 = (thick - thin) * dir theta;

    lft x1r = w - rt x4l = 0;
    top y4r = h;
    bot y1l = vround(bot y1l + min(2/3[x_height, h], y3l- 1/4thin) - top y1r);

    pair delta;
    ypart delta = 3(y3l - y1l);
    delta = whatever * dir theta;

    filldraw z1l ..controls (z1l + delta) and (z3l - delta) .. z3l .. z4l
           -- z4r ..controls(z4r - delta) and (z2r + delta) .. z2r .. z1r -- cycle;
  endchar;
endfor;
charlist current_char - 4: current_char - 3: current_char - 2: current_char - 1: current_char;

for scale = 1, 2, 3, 4, 5:
  beginsymbol(scale * 8u# + 2side_bearing#, asc_height#, 0); "wide paren";

    thick := rule_thickness;
    thin  := 1/2thick;

    pickup pencircle scaled thin;

    numeric theta;
    theta = angle (1/6(w - thin), 1/4(h - x_height));

    penpos1(thin, 90 + theta);
    penpos2(thin, 90 + theta);
    penpos3(thin, 90 - theta);
    penpos4(thin, 90 - theta);
    penpos5(thin, 90);

    z2 - z1 = (thick - thin) * dir theta;
    z3 - z4 = (thick - thin) * dir (180 - theta);

    lft x1r = w - rt x4r = side_bearing;
    x5 = w/2;
    top y5r = h;
    bot y4l = vround(bot y4l - top y4r + 2/3[x_height, h]);
    bot y1l = vround(bot y1l - top y1r + 2/3[x_height, h]);

    filldraw z1l .. z2l .. z5l .. z3l .. z4l
           -- z4r .. z3r .. z5r .. z2r .. z1r -- cycle;
  endchar;
endfor;
charlist current_char - 4: current_char - 3: current_char - 2: current_char - 1: current_char;

beginsymbol(6u# + 2side_bearing#, asc_height#, 0); "vec";
  pickup pencircle scaled 2/3rule_thickness;

  x0 = w - x1 = side_bearing;
  top y0 = top y1 = h - 5/4rule_thickness;

  draw z0 -- z1;
  draw arrowhead(z1, 0, 5/2rule_thickness);
endchar;


beginsymbol(5u# + 2side_bearing#, 1/3asc_height#, 0); "middle bar";

  penpos0(7/5rule_thickness, 70);
  penpos1(7/5rule_thickness, 70);

  x0 = w - x1 = side_bearing;
  y0 = y1 = h;

  fill stroke z0e -- z1e;
endchar;

beginsymbol(5u# + 2side_bearing#, 1/3asc_height#, 0); "middle slash";

  penpos0(3/2rule_thickness, 70);
  penpos1(3/2rule_thickness, 70);

  x0 = w - x1 = side_bearing;
  1/2[y0,y1] = h;
  y1 - y0 = 2rule_thickness;

  fill stroke z0e -- z1e;
endchar;

beginsymbol(5u# + 2side_bearing#, 6/4asc_height#, 0); "stroke through";
  pickup pencircle scaled rule_thickness;

  z0 = (w/2,1/6asc_height);

  draw (z0 - 3/4asc_height / cosd 20 * dir 70) -- (z0 + 3/4asc_height / cosd 20 * dir 70);
endchar;