5 fet_beginfont("feta-braces", 16);
14 def draw_brace (expr height_sharp, width_sharp, slt_sharp) =
16 save pendir, height, width, thin, thick, slt;
18 height# := height_sharp;
19 width# := width_sharp;
22 beginchar(code, width#, height#/2, height#/2);
25 define_pixels (height, width, slt);
36 pendir = unitvector(x3 - x1, y3l/6 - y1);
37 penangle = angle pendir - 90;
38 penpos3(thin, penangle);
39 penpos2(thick, angle(z3 -z1) -90 );
40 penpos1(2/3 thin, penangle);
43 fill z2r .. simple_serif (z3r, z3l, 90)
44 .. z2l .. simple_serif (z1l, z1r, 90) ..cycle;
46 addto currentpicture also currentpicture yscaled -1;
58 for i := 0 step 1 until font_count:
60 %% We can't store more than 64 (65?) height dimensions in a TFM
61 %% file, so we make small files.
63 for j := 0 step 1 until 65:
64 % message "l: "&decimal l;
65 % note: define_pixels (x) multiplies x by hppp,
66 % must never get bigger than infinity
67 y := min (y + l / 2, infinity/hppp - 1);
68 % x should be about one staff space, taking brace to have
69 % default height of 3 staffs, this yields height / 3 / 4
71 % l should be about one stafflinethickness
79 fet_endfont("feta-braces");