From: hanwen Date: Mon, 15 Sep 2003 20:34:30 +0000 (+0000) Subject: * lily/tuplet-bracket.cc (brew_molecule): don't print bracket when X-Git-Tag: release/2.1.3~162 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6a676011d6e7606cae3fde83587b40470d010db3;p=lilypond.git * lily/tuplet-bracket.cc (brew_molecule): don't print bracket when it would too small. * lily/font-metric.cc: return #f for non-existent glyph. * VERSION (MY_PATCH_LEVEL): read VERSION; version number is now exported through config.make. --- diff --git a/ChangeLog b/ChangeLog index 0e7df8b634..898574255b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ 2003-09-15 Han-Wen Nienhuys - * VERSION (MY_PATCH_LEVEL): readd VERSION; version number is now + * lily/tuplet-bracket.cc (brew_molecule): don't print bracket when + it would be too small. + + * lily/font-metric.cc: return #f for non-existent glyph. + + * VERSION (MY_PATCH_LEVEL): read VERSION; version number is now exported through config.make. * input/regression/clef-oct.ly: new file. @@ -73,8 +78,6 @@ * lily/lexer.ll: add \r to the rules for newlines; this fixes problems on older Mac editors. - * configure.in: release 1.9.5 - 2003-09-12 Juergen Reuter * mf/parmesan-clefs.mf: more set_char_box() fixes and code cleanup @@ -102,6 +105,8 @@ 2003-09-09 Han-Wen Nienhuys + * configure.in: release 1.9.5 + * scripts/lilypond.py (global_latex_preamble): only set twosideshift if 'twoside' is in latexoptions diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 5b0c57e220..eb85074015 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -8,6 +8,15 @@ @chapter New features in 1.9 since 1.8 @itemize +@item +Clefs may now be transposed arbitrarily, for example + +@example + \clef "G_8" + \clef "G_15" + \clef "G_9" +@end example + @item The syntax for chords and simultaneous music have changed. @@ -17,7 +26,7 @@ Chords are entered as <@var{pitches}> @end example -while simultaneous music is entered +while simultaneous music is entered as @example <<@var{..music list..}>> diff --git a/VERSION b/VERSION index 8456a7dd97..c943370936 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,4 @@ +PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=9 PATCH_LEVEL=6 diff --git a/lily/font-metric.cc b/lily/font-metric.cc index a1c0f72bff..39a08d5537 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -146,13 +146,19 @@ Font_metric::find_by_name (String) const LY_DEFINE(ly_find_glyph_by_name, "ly:find-glyph-by-name", 2 , 0, 0, (SCM font, SCM name), "This function retrieves a Molecule for the glyph named @var{name} in " -"@var{font}. The font must be available as an AFM file.") +"@var{font}. The font must be available as an AFM file. If the glyph " +"is not found, #f is returned. ") { Font_metric *fm = unsmob_metrics (font); SCM_ASSERT_TYPE(fm, font, SCM_ARG1, __FUNCTION__, "font-metric"); SCM_ASSERT_TYPE(gh_string_p (name), name, SCM_ARG2, __FUNCTION__, "string"); - return fm->find_by_name (ly_scm2string (name)).smobbed_copy (); + Molecule m = fm->find_by_name (ly_scm2string (name)); + + if (m.get_expr () != SCM_EOL) + return m.smobbed_copy (); + else + return SCM_BOOL_F; } LY_DEFINE(ly_get_glyph, "ly:get-glyph", 2 , 0, 0, diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 21d57e9394..8843a0047a 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -150,7 +150,7 @@ Tuplet_bracket::brew_molecule (SCM smob) Real x1 = rgr->extent (commonx,X_AXIS)[RIGHT]; Real w = x1 -x0; - + Real ly = gh_scm2double (me->get_grob_property ("left-position")); Real ry = gh_scm2double (me->get_grob_property ("right-position")); SCM number = me->get_grob_property ("text"); @@ -169,16 +169,29 @@ Tuplet_bracket::brew_molecule (SCM smob) mol.add_molecule (num); } - + + + /* + No bracket when it would be smaller than the number. + + TODO: should use GAP in calculation too. + */ + if (bracket_visibility && number_visibility + && mol.extent (X_AXIS).length () > w) + { + bracket_visibility = false; + } + if (bracket_visibility) { Real lt = pap->get_realvar (ly_symbol2scm ("linethickness")); - + SCM thick = me->get_grob_property ("thickness"); if (gh_number_p (thick)) lt *= gh_scm2double (thick); - + SCM gap = me->get_grob_property ("gap"); + SCM fl = me->get_grob_property ("bracket-flare"); SCM eh = me->get_grob_property ("edge-height"); SCM sp = me->get_grob_property ("shorten-pair"); diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index 4c67c67f11..11fc33d06d 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -118,9 +118,13 @@ Tuplet_engraver::start_translation_timestep () { if (now.main_part_ >= span_stop_moments_[i]) { - if (started_spanners_[i]) + if (Spanner *sp = started_spanners_[i]) { - typeset_grob (started_spanners_[i]); + if (!sp->get_bound (RIGHT)) + sp->set_bound (RIGHT, sp->get_bound (LEFT)); + + typeset_grob (sp); + started_spanners_[i] =0; } diff --git a/stepmake/GNUmakefile b/stepmake/GNUmakefile index fc687d50c9..0ea8a623c8 100644 --- a/stepmake/GNUmakefile +++ b/stepmake/GNUmakefile @@ -11,7 +11,7 @@ SUBDIRS = bin stepmake # list of distribution files: # -SCRIPTS = aclocal.m4 +SCRIPTS = aclocal.m4 autogen.sh README_FILES = CHANGES README TODO README_TXT_FILES = EXTRA_DIST_FILES = $(README_FILES) $(SCRIPTS) @@ -27,8 +27,5 @@ include $(depth)/make/stepmake.make install: local-install @echo Not installing stepmake -bla: - echo $(TOPLEVEL_MAJOR_VERSION) - localclean: rm -f bin/*.pyc