X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mf%2Ffeta-haak.mf;h=2e8e83275ae6c7623786c3e2c973537eff66b77a;hb=b0e91bf3c09089bc12b4aba882140fb581c54293;hp=795952304f1fe1aa892934a7a67342a375406577;hpb=9cd74f0e247768d27b86b8ebbc198adefc3d37a0;p=lilypond.git diff --git a/mf/feta-haak.mf b/mf/feta-haak.mf index 795952304f..2e8e83275a 100644 --- a/mf/feta-haak.mf +++ b/mf/feta-haak.mf @@ -1,33 +1,43 @@ +% feta-haak.mf -- implement bracket tips -*-Fundamental-*- +% +% part of LilyPond's pretty-but-neat music font +% +% source file of the Feta (not the Font-En-Tja) music font +% +% (c) 2005--2007 Han-Wen Nienhuys fet_begingroup ("brackettips"); -def draw_bracket(expr thick_sharp, width_sharp, updown) = +def draw_bracket (expr thick_sharp, width_sharp, updown) = begingroup; - save p, thin, thick, flattening, width, hair; + save p, thin, thick, flattening, width, hair, flare; path p; pair tipdir; - flattening = 0.70; - thick# := thick_sharp; - width# := width_sharp; + flattening = 0.72; + thick# = thick_sharp; + flare# = flattening * width#; + width# = width_sharp; - define_pixels (thick, width); + define_pixels (thick, width, flare); if updown = 1: set_char_box (0, width#, - .5 thick# , flattening * width#); + .5 thick#, flare#); else: set_char_box (0, width#, - flattening * width#, .5 thick#); + flare#, .5 thick#); fi; thin = 2 linethickness; - hair = linethickness; + hair = 1.25 linethickness; pickup pencircle scaled thin; + y7 = y1; + x7 = x2; + z2 = z4r + (thin, 0); - - penpos3(thin, 0); - penpos4(thin, 90); + penpos3 (thin, 0); + penpos4 (thin, 90); z3 = z4; @@ -36,50 +46,47 @@ begingroup; x1 = x3l; y1 = -0.5 thick; + z8 = .5 [z2, z7]; + top y5 = flare; + rt x5 = width; - save tight; - tight := 1.3; - z5 = .5 [z1, z3] + (width - thin, flattening * width - .5 thin); - p := .5 [z1, z3]{right} - .. tension tight - .. z5; - tipdir := (direction 1 of p); + p := z8{right} + ..tension 1.2.. z5{curl 0}; + tipdir := direction 1 of p; - penpos5 (hair, angle (tipdir)); - penpos6 (hair, 90 + angle (tipdir)); + penpos5 (hair, angle tipdir); + penpos6 (hair, 90 + angle tipdir); z5 = z6; - z7 = z1 + (thick,0); - z2 = z4r + (thin, 0); - pickup pencircle scaled 1; - % draw p; - fill (z1{up} .. z3l{up} - .. z4r{right} - .. z2{right} - .. tension tight - .. z6r{tipdir} - .. z5r .. z6l{-tipdir} - .. tension tight - .. z7{left} .. z1{left} & cycle) - yscaled updown; - + fill (z1 + -- z3l{up} + .. z4r{right} + -- z2{right} + .. z6r{tipdir} + .. z5r + .. z6l{-tipdir} + ..tension 1.1.. z7{left} + & z7 + -- z1 + & cycle) yscaled updown; if updown = 1: - penlabels (1,2,3,4,5,6,7); + penlabels (1, 2, 3, 4, 5, 6, 7, 8); fi; - endgroup; enddef; + fet_beginchar ("bracket tip up", "up"); - draw_bracket (0.45 staff_space#, 2.0 staff_space#, 1); + draw_bracket (0.45 staff_space#, 1.9 staff_space#, 1); fet_endchar; -fet_beginchar ("bracket tip down", "down"); - draw_bracket (0.45 staff_space#, 2.0 staff_space#, -1); + +fet_beginchar ("bracket tip down", "down"); + draw_bracket (0.45 staff_space#, 1.9 staff_space#, -1); fet_endchar; fet_endgroup ("brackettips");