-for i := font_count * 256 step 1 until (font_count + 1) * 256 - 1:
- % note: define_pixels (x) multiplies x by hppp,
- % we must never get bigger than infinity
- y := min ((i + 1) * 0.25pt#, infinity/hppp - 1);
- x := y / 12;
- draw_brace (y, x);
+
+
+save stafflinethickness;
+save increment;
+
+linethickness := 0.5pt#;
+increment := 0.5pt#;
+y := 10pt#;
+
+
+
+for i := 0 step 1 until font_count:
+
+ %% We can't store more than 64 (65?) height dimensions in a TFM
+ %% file, so we make small files.
+
+ for j := 0 step 1 until 63:
+ % message "l: "&decimal l;
+ % note: define_pixels (x) multiplies x by hppp,
+ % must never get bigger than infinity
+ y := min (y + increment, infinity/hppp - 1);
+
+ % x should be about one staff space, taking brace to have
+ % default height of 3 staffs, this yields height / 3 / 4 = 12
+ % but 15 looks better
+ x := y / 15;
+
+ increment := x / 10;
+ linethickness := min (0.5pt#, y/150);
+ if i = font_count:
+ draw_brace (y, x, linethickness);
+ fi
+ endfor;