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;
53 save stafflinethickness;
56 stafflinethickness := 0.5pt#;
62 for i := 0 step 1 until font_count:
64 %% We can't store more than 64 (65?) height dimensions in a TFM
65 %% file, so we make small files.
67 for j := 0 step 1 until 63:
68 % message "l: "&decimal l;
69 % note: define_pixels (x) multiplies x by hppp,
70 % must never get bigger than infinity
71 y := min (y + increment, infinity/hppp - 1);
73 % x should be about one staff space, taking brace to have
74 % default height of 3 staffs, this yields height / 3 / 4
76 % l should be about one stafflinethickness
79 stafflinethickness := min (0.5pt#, y/120 );
81 draw_brace (y, x, stafflinethickness);
86 fet_endfont("feta-braces");