+def draw_bass_clef (expr exact_center, reduction) =
+ save reduced_ss, swoosh_width;
+ save right_thickness, right_offset, tip_protrude;
+ save dot_diam, bulb_y_offset, bulb_flare;
+ pair tip_protrude;
+
+ reduced_ss# = staff_space# * reduction;
+ 2.2 dot_diam# = reduction * (staff_space# - stafflinethickness#);
+ right_thickness# = 0.37 staff_space# + 1.2 linethickness#;
+ swoosh_width# = 2.1 reduced_ss#;
+ define_pixels (swoosh_width);
+ define_whole_pixels (reduced_ss);
+ define_whole_blacker_pixels (dot_diam, right_thickness);
+
+ right_offset = 0.05 staff_space;
+ bulb_y_offset := 0.075 staff_space;
+ bulb_flare := 2.5 linethickness;
+% tip_protrude := (-linethickness, -.2 staff_space);
+ tip_protrude := (0, 0);
+
+ set_char_box (-xpart exact_center,
+ xpart exact_center + swoosh_width# + 7/12 reduced_ss#,
+ -ypart exact_center + 2.5 reduced_ss#,
+ ypart exact_center + reduced_ss#);
+
+ y1 = bulb_y_offset;
+ x1 = 0;
+
+ x2 = .5 [x1, x3];
+ x2l = x2r = x2;
+
+ y2l := vround_pixels (reduced_ss# + 0.5 linethickness#);
+ y2l - y2r = linethickness;
+
+ x3l - x1 = swoosh_width;
+ x3l - x3r = right_thickness;
+
+ % optical correction: the top dot seems farther away if y3l = 0.
+ y3l = right_offset;
+
+ z4 = -(0, 2.0 reduced_ss) + tip_protrude;
+
+ penpos3 (whatever, 185);
+ penpos4 (linethickness, 135);
+
+ fill new_bulb (z2l, 180, z1, z2r, 0,
+ 0.45 reduced_ss, 0.4 reduced_ss,
+ bulb_flare, 1, 1)
+ .. z3r{down}
+ .. {curl 0}simple_serif (z4r, z4l, 90){curl 0}
+ .. z3l{up}
+ ..tension 0.9.. cycle;
+
+ pickup pencircle scaled dot_diam;
+
+ lft x5 = hround (x3l + 1/3 reduced_ss - dot_diam / 2);
+ bot y5 = vfloor (.5 reduced_ss - dot_diam / 2);
+ z6 = z5 yscaled -1;
+
+ % for symmetry
+ y5 := y5 + feta_shift;
+
+ drawdot z5;
+ drawdot z6;
+
+ penlabels (1, 2, 3, 4, 5, 6);
+
+ draw_staff (-3, 1, 0);
+enddef;
+
+
+fet_beginchar ("F clef ", "F");
+ draw_bass_clef ((0, 0), 1.0);