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