CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/05/28 00:47:04
Modified files: . : ChangeLog lily : system-start-delimiter.cc lily/include : system-start-delimiter.hh mf : GNUmakefile feta-generic.mf feta-haak.mf feta-test-generic.mf scm : define-grobs.scm stepmake/stepmake: metafont-rules.make Log message: * lily/system-start-delimiter.cc (staff_bracket): use glyphs. * mf/feta-generic.mf: include feta-haak. * mf/feta-haak.mf: rewrite. Make separate glyphs for the tips CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3669&tr2=1.3670&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/system-start-delimiter.cc.diff?tr1=1.94&tr2=1.95&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/include/system-start-delimiter.hh.diff?tr1=1.22&tr2=1.23&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/mf/GNUmakefile.diff?tr1=1.164&tr2=1.165&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/mf/feta-generic.mf.diff?tr1=1.76&tr2=1.77&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/mf/feta-haak.mf.diff?tr1=1.4&tr2=1.5&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/mf/feta-test-generic.mf.diff?tr1=1.16&tr2=1.17&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-grobs.scm.diff?tr1=1.201&tr2=1.202&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/stepmake/stepmake/metafont-rules.make.diff?tr1=1.33&tr2=1.34&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.3669 lilypond/ChangeLog:1.3670 --- lilypond/ChangeLog:1.3669 Fri May 27 22:04:30 2005 +++ lilypond/ChangeLog Sat May 28 00:47:03 2005 @@ -1,5 +1,11 @@ 2005-05-28 Han-Wen Nienhuys <[EMAIL PROTECTED]> + * lily/system-start-delimiter.cc (staff_bracket): use glyphs. + + * mf/feta-generic.mf: include feta-haak. + + * mf/feta-haak.mf: rewrite. Make separate glyphs for the tips + * scm/framework-ps.scm (write-preamble): only load fonts if their filename is a string. Index: lilypond/lily/include/system-start-delimiter.hh diff -u lilypond/lily/include/system-start-delimiter.hh:1.22 lilypond/lily/include/system-start-delimiter.hh:1.23 --- lilypond/lily/include/system-start-delimiter.hh:1.22 Thu Mar 10 14:36:12 2005 +++ lilypond/lily/include/system-start-delimiter.hh Sat May 28 00:47:04 2005 @@ -24,6 +24,7 @@ DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); static void try_collapse (Grob *); static Stencil staff_bracket (Grob *, Real); + static Stencil old_staff_bracket (Grob *, Real); static Stencil staff_brace (Grob *, Real); static Stencil simple_bar (Grob *, Real); }; Index: lilypond/lily/system-start-delimiter.cc diff -u lilypond/lily/system-start-delimiter.cc:1.94 lilypond/lily/system-start-delimiter.cc:1.95 --- lilypond/lily/system-start-delimiter.cc:1.94 Thu May 5 23:45:30 2005 +++ lilypond/lily/system-start-delimiter.cc Sat May 28 00:47:04 2005 @@ -20,7 +20,7 @@ #include "item.hh" Stencil -System_start_delimiter::staff_bracket (Grob *me, Real height) +System_start_delimiter::old_staff_bracket (Grob *me, Real height) { Real arc_height = scm_to_double (me->get_property ("arch-height")); @@ -58,6 +58,31 @@ return mol; } + + +Stencil +System_start_delimiter::staff_bracket (Grob *me, Real height) +{ + Font_metric *fm = Font_interface::get_default_font (me); + Drul_array<Stencil> tips (fm->find_by_name ("brackettips.down"), + fm->find_by_name ("brackettips.up")); + + Real thickness = robust_scm2double (me->get_property ("thickness"), 0.25); + + Stencil bracket = Lookup::filled_box (Box (Interval (0, thickness), + Interval (-height/2, height/2))); + + Direction d = DOWN; + do + { + bracket.add_at_edge (Y_AXIS, d, tips[d], 0.0, 0.0); + } + while (flip (&d) != DOWN); + + return bracket; +} + + Stencil System_start_delimiter::simple_bar (Grob *me, Real h) { Index: lilypond/mf/GNUmakefile diff -u lilypond/mf/GNUmakefile:1.164 lilypond/mf/GNUmakefile:1.165 --- lilypond/mf/GNUmakefile:1.164 Thu May 26 19:57:35 2005 +++ lilypond/mf/GNUmakefile Sat May 28 00:47:04 2005 @@ -5,7 +5,10 @@ include $(depth)/make/stepmake.make -AF_FILES = $(wildcard *.af) +AF_FILES = $(wildcard *.af) + +# hangs on feta23 +MFTRACE_FLAGS= # --simplify EXTRA_DIST_FILES += README feta.tex Index: lilypond/mf/feta-generic.mf diff -u lilypond/mf/feta-generic.mf:1.76 lilypond/mf/feta-generic.mf:1.77 --- lilypond/mf/feta-generic.mf:1.76 Fri Feb 4 13:48:10 2005 +++ lilypond/mf/feta-generic.mf Sat May 28 00:47:04 2005 @@ -36,6 +36,7 @@ input feta-klef; input feta-timesig; input feta-pendaal; + input feta-haak; input feta-accordion; else: input feta-test-generic.mf; Index: lilypond/mf/feta-haak.mf diff -u lilypond/mf/feta-haak.mf:1.4 lilypond/mf/feta-haak.mf:1.5 --- lilypond/mf/feta-haak.mf:1.4 Sun Jan 25 15:15:25 2004 +++ lilypond/mf/feta-haak.mf Sat May 28 00:47:04 2005 @@ -1,74 +1,75 @@ -input feta-macros; -input feta-params; -input feta-autometric; - -save code; -code :=0; - - -def draw_bracket( expr height_sharp, width_sharp) = - save alpha, height, p, width, thin, thick; - height# := height_sharp; - width# := width_sharp; - - beginchar(incr code, width#, height#/2, height#/2); - - define_pixels (height, width); + +fet_begingroup ("brackettips"); + +def draw_bracket(expr thick_sharp, width_sharp, updown) = +begingroup; + save p, thin, thick, flattening, width; + path p; + pair tipdir; + + flattening = 0.70; + thick# := thick_sharp; + width# := width_sharp; + + define_pixels (thick, width); + if updown = 1: + set_char_box (0, width#, + .5 thick# , flattening * width#); + else: + set_char_box (0, width#, + flattening * width#, .5 thick#); + fi; + thin = 2 linethickness; - thick = .5 staff_space; pickup pencircle scaled thin; - lft x1 = 0; - top y1 = height/2 + thick + thin; - x2 = x1; - z2 = (x1, 0); - rt x3 = thick; - y3 = y2; - - x4 = x3; - bot y4 = y1 - thick + thin/2; - - alpha = 50; - z5 = z1 + (width, 3/4staff_space); - - % need silly z6? - % strange turning path when invoked via MakeTeXTFM...? - % mf "\\mode:=ljfour; mag:=1; scrollmode; input feta-brackets16" - z6 = z5 - (0, thin/16); - - filldraw z5{dir(180+alpha)}..{left}z1--z2--z3..{up}z4{right} - ..{dir(alpha)}z6..cycle; - -% % try control points to do this in ps -% currentpicture:=currentpicture shifted (-x5/2,(x5-x4)/2); -% -% s7 := 0.4*(x5-x1); -% x7 = x1 + s7 * cosd(0); -% y7 = y1 + s7 * sind(0); -% -% s8 := -0.25*(x5-x1); -% x8 := x5 + s8 * cosd(alpha); -% y8 := y5 + s8 * sind(alpha); -% -% s9 := 0.5*(x5-x4); -% x9 := x4 + s9 * cosd(0); -% y9 := y4 + s9 * sind(0); -% -% s10 := -0.15*(x5-x4); -% x10 := x5 + s10 * cosd(alpha); -% y10 := y5 + s10 * sind(alpha); -% -% draw z5..controls z8 and z7..z1--z2--z3..{up}z4 -% ..controls z9 and z10..z6..cycle; -% -% labels(1,2,3,4,5,6,7,8,9,10); - addto currentpicture also currentpicture yscaled -1; -endchar; + + penpos3(thin, 0); + penpos4(thin, 90); + + z3 = z4; + + top y3 = 0.5 thick; + lft x3 = 0.0; + x1 = x3l; + y1 = -0.5 thick; + + z5 = .5 [z1, z3] + (width - thin, flattening * width - .5 thin); + p := .5 [z1, z3]{right} .. z5; + tipdir := (direction 1 of p); + + penpos5 (thin, angle (tipdir)); + penpos6 (thin, 90 + angle (tipdir)); + + z5 = z6; + + z7 = z1 + (thick,0); + + + pickup pencircle scaled 1; + + % draw p; + fill (z1{up} .. z3l{up} + .. z4r{right} .. z6r{tipdir} + .. z5r .. z6l{-tipdir} + .. z7{left} .. z1{left} & cycle) + yscaled updown; + + + if updown = 1: + penlabels (1,2,3,4,5,6,7); + fi; + +endgroup; enddef; -% for h := staffsize# step 1 pt# until (1.1 * staffsize#): -for h := staffsize# step 1 pt# until (7 * staffsize#): - draw_bracket(h, 2staff_space# ); -endfor +fet_beginchar ("bracket tip up", "up"); + draw_bracket (0.45 staff_space#, 2.0 staff_space#, 1); +fet_endchar; + +fet_beginchar ("bracket tip down", "down"); + draw_bracket (0.45 staff_space#, 2.0 staff_space#, -1); +fet_endchar; +fet_endgroup ("brackettips"); Index: lilypond/mf/feta-test-generic.mf diff -u lilypond/mf/feta-test-generic.mf:1.16 lilypond/mf/feta-test-generic.mf:1.17 --- lilypond/mf/feta-test-generic.mf:1.16 Fri May 13 10:31:02 2005 +++ lilypond/mf/feta-test-generic.mf Sat May 28 00:47:04 2005 @@ -4,13 +4,14 @@ % %input feta-eindelijk; -input feta-toevallig; +%input feta-toevallig; %input feta-puntje; -%input feta-bolletjes; +input feta-bolletjes; %input feta-schrift; %input feta-banier; % input feta-slag; -input feta-klef; +%input feta-klef; +input feta-haak; % input feta-haak; %input feta-timesig; %input feta-pendaal; Index: lilypond/scm/define-grobs.scm diff -u lilypond/scm/define-grobs.scm:1.201 lilypond/scm/define-grobs.scm:1.202 --- lilypond/scm/define-grobs.scm:1.201 Thu May 26 00:09:54 2005 +++ lilypond/scm/define-grobs.scm Sat May 28 00:47:04 2005 @@ -1207,7 +1207,7 @@ (arch-thick . 0.25) (arch-width . 1.5) (collapse-height . 1) - (thickness . 0.25) + (thickness . 0.45) (meta . ((interfaces . (system-start-delimiter-interface spanner-interface)))) )) Index: lilypond/stepmake/stepmake/metafont-rules.make diff -u lilypond/stepmake/stepmake/metafont-rules.make:1.33 lilypond/stepmake/stepmake/metafont-rules.make:1.34 --- lilypond/stepmake/stepmake/metafont-rules.make:1.33 Fri Mar 11 16:52:25 2005 +++ lilypond/stepmake/stepmake/metafont-rules.make Sat May 28 00:47:04 2005 @@ -31,7 +31,7 @@ MFTRACE_FORMATS = pfa pfb svg $(outdir)/%.pfb $(outdir)/%.svg $(outdir)/%.pfa: %.mf - $(MFTRACE) $(MFTRACE_FLAGS) --simplify -I $(outdir)/ --formats=pfa,pfb,svg $(basename $(@F)) + $(MFTRACE) $(MFTRACE_FLAGS) -I $(outdir)/ --formats=pfa,pfb,svg $(basename $(@F)) # -mv $(MFTRACE_FORMATS:%=$(basename $(@F).%)) $(outdir) -mv $(basename $(@F)).pfa $(outdir) -mv $(basename $(@F)).pfb $(outdir) _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs