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;