-brevis_wid# := 2 staff_space#;
-
-def draw_brevis(expr exact_center, reduction, small_width, small_height) =
- %
- % inspired by function draw_brevis of
- % feta-bolletjes.mf
- %
- save reduced_slt, reduced_nht;
- save stem_width, head_width;
- save serif_size, serif_protrude;
- save holeheight, beamheight;
-
- reduced_slt# = stafflinethickness# * reduction;
- reduced_nht# = noteheight# * reduction;
- stem_width# = 1.4 reduced_slt#;
- if small_width:
- head_width# = 0.5brevis_wid# * reduction;
- else:
- head_width# = brevis_wid# * reduction;
- fi;
- if small_height:
- serif_size# = 0.64 reduced_slt#;
- serif_protrude# = 0.96 serif_size#;
- holeheight# = 3 reduced_slt#;
- beamheight# = 0.32(reduced_nht# - holeheight#);
- else:
- serif_size# = 1.0 reduced_slt#;
- serif_protrude# = 1.5 serif_size#;
- holeheight# = 3 reduced_slt#;
- beamheight# = 0.5(reduced_nht# - holeheight#);
- fi;
- define_pixels(reduced_slt);
- define_pixels(stem_width);
- define_pixels(head_width);
- define_pixels(serif_size);
- define_pixels(serif_protrude);
- define_pixels(beamheight);
-
- penpos1(stem_width, 0);
- penpos2(stem_width, 0);
- penpos3(beamheight, 90);
- penpos4(beamheight, 90);
- penpos5(stem_width, 180);
-
- z1l = exact_center;
- z2l = z1l + (0, -reduced_slt/2);
- z3r = z2r + serif_size*(1,-1);
- y4r = y3r;
- x4l = x1l + head_width/2;
- z5l = z3l + (-serif_size, -serif_protrude);
-
- penlabels(1,2,3,4,5);
- fill z1r -- z1l -- z5r{down} .. z5l{up} .. z3l{right}
- -- z4l -- z4r -- z3r{left} .. z2r{up} -- cycle;
-enddef;