? run ? Documentation/out ? Documentation/bibliography/out ? Documentation/misc/out ? Documentation/pictures/out ? Documentation/topdocs/out ? Documentation/user/out ? Documentation/windows/out ? buildscripts/out ? cygwin/out ? debian/out ? flower/out ? flower/include/out ? input/out ? input/ascii-art/out ? input/mutopia/out ? input/mutopia/E.Satie/out ? input/mutopia/F.Schubert/out ? input/mutopia/J.S.Bach/out ? input/mutopia/J.S.Bach/Petites-Preludes/out ? input/mutopia/R.Schumann/out ? input/mutopia/W.A.Mozart/out ? input/no-notation/out ? input/regression/out ? input/sondag-morgen/out ? input/template/out ? input/test/out ? input/tutorial/out ? lily/out ? lily/include/out ? ly/out ? make/out ? mf/out ? po/out ? ps/out ? python/out ? scm/out ? scripts/out ? stepmake/out ? stepmake/stepmake/out ? tex/out Index: ChangeLog =================================================================== RCS file: /cvsroot/lilypond/lilypond/ChangeLog,v retrieving revision 1.482.2.59 diff -u -r1.482.2.59 ChangeLog --- ChangeLog 13 Sep 2002 18:28:58 -0000 1.482.2.59 +++ ChangeLog 13 Sep 2002 19:40:32 -0000 @@ -1,3 +1,18 @@ +2002-09-13 Juergen Reuter + + * lily/rests.ly: added comment on bogus warnings about missing flags + + * lily/clef.cc, lily/rests.cc: added warning when font character + lookup fails. + + * lily/rests.cc: workaround: consider missing ledgered rests in + ancient font. + + * lily/rests.cc: bugfix: cleaned up font lookup code that handles + special cases of styles 'default' and 'classical'. This should + also fix the behaviour of lily/multi-measure-rest.cc, which so far + did not consider styles 'default' and 'classical'. + 2002-09-13 Rune Zedeler * scm/drums.scm: "set" the automatic properties instead of Index: input/test/rests.ly =================================================================== RCS file: /cvsroot/lilypond/lilypond/input/test/rests.ly,v retrieving revision 1.6.2.1 diff -u -r1.6.2.1 rests.ly --- input/test/rests.ly 5 Sep 2002 21:16:50 -0000 1.6.2.1 +++ input/test/rests.ly 13 Sep 2002 19:40:33 -0000 @@ -3,6 +3,10 @@ texidoc = "rests in various styles." } +% FIXME: Currently, this file produces "warning: flag `d-3' not found" +% errors (and similar for "d7") from Stem::flag(). This is should not +% happen, since there are no notes/stems in this example. + \score { \context Staff \notes\relative c { \property Staff.Rest \set #'style = #'mensural @@ -28,7 +32,7 @@ \paper { \translator { \StaffContext - %%%% The following looks good, but produces + %%%% FIXME: The following looks good, but produces %%%% lots of warnings: % \remove Bar_engraver } Index: lily/clef.cc =================================================================== RCS file: /cvsroot/lilypond/lilypond/lily/clef.cc,v retrieving revision 1.6 diff -u -r1.6 clef.cc --- lily/clef.cc 4 Aug 2002 16:56:17 -0000 1.6 +++ lily/clef.cc 13 Sep 2002 19:40:33 -0000 @@ -19,7 +19,7 @@ SCM Clef::before_line_breaking (SCM smob) { - Item * s = unsmob_item (smob); + Item *s = unsmob_item (smob); SCM glyph = s->get_grob_property ("glyph-name"); @@ -51,16 +51,19 @@ SCM Clef::brew_molecule (SCM smob) { - Grob * sc = unsmob_grob (smob); - SCM glyph = sc->get_grob_property ("glyph-name"); - if (gh_string_p (glyph)) - { - return Font_interface::get_default_font (sc)->find_by_name (String (ly_scm2string (glyph))).smobbed_copy (); - } - else + Grob *me = unsmob_grob (smob); + SCM glyph_scm = me->get_grob_property ("glyph-name"); + if (!gh_string_p (glyph_scm)) + return SCM_EOL; + + String glyph = String (ly_scm2string (glyph_scm)); + Font_metric *fm = Font_interface::get_default_font (me); + Molecule out = fm->find_by_name (glyph); + if (out.empty_b()) { - return SCM_EOL; + me->warning (_f ("clef `%s' not found", glyph.to_str0 ())); } + return out.smobbed_copy (); } Index: lily/rest.cc =================================================================== RCS file: /cvsroot/lilypond/lilypond/lily/rest.cc,v retrieving revision 1.63 diff -u -r1.63 rest.cc --- lily/rest.cc 31 Jul 2002 06:42:48 -0000 1.63 +++ lily/rest.cc 13 Sep 2002 19:40:33 -0000 @@ -48,11 +48,10 @@ /* make this function easily usable in C++ */ - String -Rest::glyph_name (Grob * me, int balltype, String style) +Rest::glyph_name (Grob *me, int balltype, String style) { - bool ledger_b =false; + bool ledgered_b = false; if (balltype == 0 || balltype == 1) { @@ -63,18 +62,49 @@ Figure out when the rest is far enough outside the staff. This could bemore generic, but hey, we understand this even after dinner. - */ - ledger_b = ledger_b || (balltype == 0 && (pos >= rad +2 || pos < -rad )); - ledger_b = ledger_b || (balltype == 1 && - (pos <= -rad -2 || pos > rad)); + ledgered_b |= (balltype == 0) && (pos >= +rad + 2 || pos < -rad); + ledgered_b |= (balltype == 1) && (pos <= -rad - 2 || pos > +rad); } - return ("rests-") + to_string (balltype) - + (ledger_b ? "o" : "") + style; -} + String actual_style (style.to_str0 ()); + if ((style == "mensural") || (style == "neo_mensural")) { + /* + FIXME: Currently, ancient font does not provide ledgered rests; + hence the "o" suffix in the glyph name is bogus. But do we need + ledgered rests at all now that we can draw ledger lines with + variable width, length and blotdiameter? -- jr + */ + ledgered_b = 0; + + /* + There are no 32th/64th/128th mensural/neo_mensural rests. In + these cases, revert back to default style. + */ + if (balltype > 4) + actual_style = ""; + } + + if ((style == "classical") && (balltype != 2)) { + /* + classical style: revert back to default style for any rest other + than quarter rest + */ + actual_style = ""; + } + + if (style == "default") { + /* + Some parts of lily still prefer style "default" over "". + Correct this here. -- jr + */ + actual_style = ""; + } + + return ("rests-") + to_string (balltype) + (ledgered_b ? "o" : "") + actual_style; +} MAKE_SCHEME_CALLBACK (Rest,brew_molecule,1); @@ -91,20 +121,21 @@ int balltype = gh_scm2int (balltype_scm); String style; - SCM style_sym =me->get_grob_property ("style"); - if (gh_symbol_p (style_sym)) + SCM style_scm = me->get_grob_property ("style"); + if (gh_symbol_p (style_scm)) { - style = ly_scm2string (scm_symbol_to_string (style_sym)); + style = ly_scm2string (scm_symbol_to_string (style_scm)); } - for(;;) { - String idx = glyph_name (me, balltype, style); - Molecule res = Font_interface::get_default_font (me)->find_by_name (idx); - if(res.empty_b() && style!="") - style=""; - else - return res.smobbed_copy(); - } + Font_metric *fm = Font_interface::get_default_font (me); + String font_char = glyph_name (me, balltype, style); + Molecule out = fm->find_by_name (font_char); + if (out.empty_b()) + { + me->warning (_f ("rest `%s' not found, ", font_char.to_str0 ())); + } + + return out.smobbed_copy(); } SCM