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;
24 hair = 1.25 linethickness;
26 pickup pencircle scaled thin;
49 p := z8{dir(leave_angle)}
51 tipdir := (direction 1 of p);
55 penpos5 (hair, tip_angle);
56 penpos6 (hair, 90 + tip_angle);
60 pickup pencircle scaled 1;
69 .. z5r .. z6l{-tipdir}
70 .. z7{dir(180 + leave_angle)} & z7 .. z1{left} & cycle)
75 penlabels (1,2,3,4,5,6,7);
81 fet_beginchar ("bracket tip up", "up");
82 draw_bracket (0.45 staff_space#, 2.0 staff_space#, 1);
85 fet_beginchar ("bracket tip down", "down");
86 draw_bracket (0.45 staff_space#, 2.0 staff_space#, -1);
89 fet_endgroup ("brackettips");