5 fet_beginfont("feta-braces", 16);
14 def draw_brace (expr height_sharp, width_sharp, slt_sharp) =
15 save pendir, height, width, thin, thick, slt;
17 height# := height_sharp;
18 width# := width_sharp;
21 beginchar(code, width#, height#/2, height#/2);
24 define_pixels (height, width, slt);
35 pendir = unitvector(x3 - x1, y3l/6 - y1);
36 penangle = angle pendir - 90;
37 penpos3(thin, penangle);
38 penpos2(thick, angle(z3 -z1) -90 );
39 penpos1(2/3 thin, penangle);
42 fill z2r .. simple_serif (z3r, z3l, 90)
43 .. z2l .. simple_serif (z1l, z1r, 90) ..cycle;
45 addto currentpicture also currentpicture yscaled -1;
52 for i := 0 step 1 until font_count:
53 for j := 0 step 1 until 255:
54 % message "l: "&decimal l;
55 % note: define_pixels (x) multiplies x by hppp,
56 % must never get bigger than infinity
57 y := min (y + l / 2, infinity/hppp - 1);
58 % x should be about one staff space, taking brace to have
59 % default height of 3 staffs, this yields height / 3 / 4
61 % l should be about one stafflinethickness
69 fet_endfont("feta-braces");