From 4019d0e018f91fd8b93a5305a46e55914219228f Mon Sep 17 00:00:00 2001 From: wl Date: Sun, 13 Nov 2005 06:16:06 +0000 Subject: [PATCH] * mf/feta-haak.mf: Formatting. (draw_bracket): Slightly modify outline to avoid an unnecessary corner. Don't use ad-hoc values for `leave_angle' and `tip_angle' but derive them from the affected paths. --- ChangeLog | 6 +++++ mf/feta-haak.mf | 68 +++++++++++++++++++++++++------------------------ 2 files changed, 41 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index 484782aff7..9376cd0884 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,12 @@ FontForge's algorithm to remove overlaps. Formatting. + * mf/feta-haak.mf: Formatting. + (draw_bracket): Slightly modify outline to avoid an unnecessary + corner. + Don't use ad-hoc values for `leave_angle' and `tip_angle' but derive + them from the affected paths. + 2005-11-13 Han-Wen Nienhuys * lily/tie-column-format.cc (set_chord_outline): add dots into diff --git a/mf/feta-haak.mf b/mf/feta-haak.mf index e2e01b0e1e..674593cfba 100644 --- a/mf/feta-haak.mf +++ b/mf/feta-haak.mf @@ -1,3 +1,10 @@ +% 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 Han-Wen Nienhuys fet_begingroup ("brackettips"); @@ -18,19 +25,19 @@ begingroup; .5 thick# , flare#); else: set_char_box (0, width#, - flare#, .5 thick#); + flare#, .5 thick#); fi; thin = 2 linethickness; hair = 1.25 linethickness; pickup pencircle scaled thin; - z7 = z1 + (3/4 thick,0); + y7 = y1; + x7 = x2; z2 = z4r + (thin, 0); - - penpos3(thin, 0); - penpos4(thin, 90); + penpos3 (thin, 0); + penpos4 (thin, 90); z3 = z4; @@ -39,52 +46,47 @@ begingroup; x1 = x3l; y1 = -0.5 thick; - - z8 = .5 [z2, z7]; + z8 = .5 [z2, z7]; top y5 = flare; rt x5 = width; - save leave_angle; - leave_angle = 10; + p := z8{right} + ..tension 1.2.. z5{curl 0}; + tipdir := direction 1 of p; - p := z8{dir(leave_angle)} - .. z5{curl 0}; - tipdir := (direction 1 of p); - - save tip_angle; - tip_angle := 50; - penpos5 (hair, tip_angle); - penpos6 (hair, 90 + tip_angle); + penpos5 (hair, angle tipdir); + penpos6 (hair, 90 + angle tipdir); z5 = z6; pickup pencircle scaled 1; - %draw p; - fill - %draw - (z1{up} .. z3l{up} - .. z4r{right} - .. z2{right} - .. z6r{tipdir} - .. z5r .. z6l{-tipdir} - .. z7{dir(180 + leave_angle)} & z7 .. 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#, 1.9 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#, 1.9 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"); -- 2.39.5