2 fet_begingroup ("brackettips");
4 def draw_bracket(expr thick_sharp, width_sharp, updown) =
6 save p, thin, thick, flattening, width, hair;
11 thick# := thick_sharp;
12 width# := width_sharp;
14 define_pixels (thick, width);
16 set_char_box (0, width#,
17 .5 thick# , flattening * width#);
19 set_char_box (0, width#,
20 flattening * width#, .5 thick#);
23 thin = 2 linethickness;
26 pickup pencircle scaled thin;
42 z5 = .5 [z1, z3] + (width - thin, flattening * width - .5 thin);
43 p := .5 [z1, z3]{right}
46 tipdir := (direction 1 of p);
48 penpos5 (hair, angle (tipdir));
49 penpos6 (hair, 90 + angle (tipdir));
56 pickup pencircle scaled 1;
59 fill (z1{up} .. z3l{up}
64 .. z5r .. z6l{-tipdir}
66 .. z7{left} .. z1{left} & cycle)
71 penlabels (1,2,3,4,5,6,7);
77 fet_beginchar ("bracket tip up", "up");
78 draw_bracket (0.45 staff_space#, 2.0 staff_space#, 1);
81 fet_beginchar ("bracket tip down", "down");
82 draw_bracket (0.45 staff_space#, 2.0 staff_space#, -1);
85 fet_endgroup ("brackettips");