From f5e5c04d731e93b1d8d4cf7e7697f71f6e7c2bdf Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 12 Jun 2000 00:04:24 +0200 Subject: [PATCH] patch::: 1.3.58.jcn2 1.3.58.jcn2 =========== * Fixed pedal items (hw) * Changed configure option tex-tmfdir to tmf-path now accepting multiple tfm directories. Automated links to cmr and amstex tfm font directories. * Replaced one scm_assoc () u-turn slipped through jcn1 --- CHANGES | 10 +++++++ VERSION | 2 +- aclocal.m4 | 45 ++++++++++++++++-------------- buildscripts/set-lily.sh | 23 +++++++++------ config.make.in | 3 +- flower/file-path.cc | 19 ++++++++++++- flower/include/file-path.hh | 3 +- lily/include/bar.hh | 2 +- lily/include/beam.hh | 2 +- lily/include/breathing-sign.hh | 2 +- lily/include/chord-name.hh | 2 +- lily/include/crescendo.hh | 2 +- lily/include/dots.hh | 2 +- lily/include/extender-spanner.hh | 2 +- lily/include/hyphen-spanner.hh | 2 +- lily/include/key-item.hh | 2 +- lily/include/local-key-item.hh | 2 +- lily/include/multi-measure-rest.hh | 2 +- lily/include/note-head.hh | 2 +- lily/include/rest.hh | 2 +- lily/include/score-element.hh | 21 ++++++++------ lily/include/slur.hh | 2 +- lily/include/staff-symbol.hh | 2 +- lily/include/stem-tremolo.hh | 2 +- lily/include/stem.hh | 2 +- lily/include/sustain-pedal.hh | 4 +-- lily/include/text-item.hh | 2 +- lily/include/tie.hh | 2 +- lily/include/time-signature.hh | 2 +- lily/include/tuplet-spanner.hh | 2 +- lily/include/volta-spanner.hh | 2 +- lily/main.cc | 18 ++++++++---- lily/piano-pedal-engraver.cc | 13 ++++----- lily/sustain-pedal.cc | 22 +++++++++------ lily/system-start-delimiter.cc | 5 ++-- ly/engraver.ly | 14 +++++++++- make/toplevel.make.in | 5 ++-- stepmake/aclocal.m4 | 39 +++++++++++++++----------- 38 files changed, 181 insertions(+), 109 deletions(-) diff --git a/CHANGES b/CHANGES index 642f5a6711..603ec451f9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,13 @@ +1.3.58.jcn2 +=========== + +* Fixed pedal items (hw) + +* Changed configure option tex-tmfdir to tmf-path now accepting multiple + tfm directories. Automated links to cmr and amstex tfm font directories. + +* Replaced one scm_assoc () u-turn slipped through jcn1 + 1.3.58.jcn1 =========== diff --git a/VERSION b/VERSION index 14173e93e6..9d24cd1c01 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=58 -MY_PATCH_LEVEL=jcn1 +MY_PATCH_LEVEL=jcn2 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/aclocal.m4 b/aclocal.m4 index 4e032e115e..25ba3293eb 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,5 +1,3 @@ -dnl WARNING WARNING WARNING WARNING -dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4 dnl aclocal.m4 -*-shell-script-*- dnl StepMake subroutines for configure.in @@ -555,26 +553,33 @@ AC_DEFUN(XXAC_STEPMAKE_TEXMF_DIRS, [ ]) AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [ - AC_ARG_ENABLE(tex-tfmdir, - [ enable-tex-tfmdir=DIR set the tex-directory where cmr10.tfm lives (default: use kpsewhich)], - [TFMDIR=$enableval], - [TFMDIR=auto] ) + AC_ARG_ENABLE(tfm-path, + [ enable-tfm-path=PATH set path of tex directories where tfm files live, esp.: cmr10.tfm (default: use kpsewhich)], + [tfm_path=$enableval], + [tfm_path=auto] ) AC_CHECK_PROGS(KPSEWHICH, kpsewhich, no) - AC_MSG_CHECKING(for TeX TFM directory) - if test "x$TFMDIR" = xauto ; then - if test "x$TEX_TFMDIR" = "x" ; then - if test "x$KPSEWHICH" != "xno" ; then - CMR10=`kpsewhich tfm cmr10.tfm` - TEX_TFMDIR=`dirname $CMR10` - else - AC_STEPMAKE_WARN(Please set TEX_TFMDIR (to where cmr10.tfm lives): - TEX_TFMDIR=/usr/local/TeX/lib/tex/fonts ./configure) - fi + AC_MSG_CHECKING(for tfm path) + + TFM_FONTS="cmr msam" + + if test "x$tfm_path" = xauto ; then + if test "x$KPSEWHICH" != "xno" ; then + for i in $TFM_FONTS; do + dir=`$KPSEWHICH tfm ${i}10.tfm` + TFM_PATH="$TFM_PATH `dirname $dir`" + done + else + AC_STEPMAKE_WARN(Please specify where cmr10.tfm lives: + ./configure --enable-tfm-path=/usr/local/TeX/lib/tex/fonts) fi + else + TFM_PATH=$tfm_path fi - AC_MSG_RESULT($TEX_TFMDIR) - AC_SUBST(TEX_TFMDIR) + + TFM_PATH=`echo $TFM_PATH | tr ':' ' '` + AC_MSG_RESULT($TFM_PATH) + AC_SUBST(TFM_PATH) ]) AC_DEFUN(AC_STEPMAKE_TEXMF, [ @@ -793,9 +798,7 @@ dnl find the libraries. AC_DEFUN([GUILE_FLAGS],[ ## The GUILE_FLAGS macro. AC_MSG_CHECKING(for Guile) - if $guile_config link > /dev/null ; then - : - else + if ! $guile_config link > /dev/null ; then AC_MSG_RESULT("cannot execute $guile_config") AC_MSG_ERROR("cannot find guile-config; is Guile installed?") exit 1 diff --git a/buildscripts/set-lily.sh b/buildscripts/set-lily.sh index df01378c45..9775748d18 100755 --- a/buildscripts/set-lily.sh +++ b/buildscripts/set-lily.sh @@ -60,14 +60,13 @@ showln -sf $LILYPOND_SOURCEDIR/buildscripts/out/genheader $prefix/bin/genheader showln -sf $LILYPOND_SOURCEDIR/scripts/out/as2text $prefix/bin/as2text - testmkdir $prefix/share rm -rf $prefix/share/lilypond showln -sf $sources/lilypond $prefix/share/lilypond BUILDDIR=`pwd` -LOCALES="de it nl fr" +LOCALES="de fr it ja nl ru" for i in $LOCALES; do dir=$BUILDDIR/share/locale/$i/LC_MESSAGES if test ! -x $dir ; then @@ -78,12 +77,20 @@ for i in $LOCALES; do done rm -f afm; showln -sf $BUILDDIR/mf/out afm rm -f tfm; showln -sf $BUILDDIR/mf/out tfm -if test "x$TEX_TFMDIR" = "x" ; then - CMR10=`kpsewhich tfm cmr10.tfm` - TEX_TFMDIR=`dirname $CMR10` -fi -rm -f cmtfm; showln -sf $TEX_TFMDIR $BUILDDIR/cmtfm +TFM_FONTS="cmr msam" +for i in $TFM_FONTS; do + dir=`kpsewhich tfm ${i}10.tfm` + TFM_PATH="$TFM_PATH `dirname $dir`" +done + +# urg: GNU make's $(word) index starts at 1 +i=1 +for dir in $TFM_PATH; do + rm -f $BUILDDIR/tfm.$i; + showln -s $dir $BUILDDIR/tfm.$i + i=$((i + 1)) +done if [ -f ../.gdbinit.lilypond ]; then @@ -98,7 +105,7 @@ echo echo Starting configuration echo -(set -x; TEX_TFMDIR=$TEX_TFMDIR ./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise) +(set -x; ./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise) echo "Making tags in background..." make TAGS > /dev/null 2>&1 & diff --git a/config.make.in b/config.make.in index 8a72dfea93..23798deabf 100644 --- a/config.make.in +++ b/config.make.in @@ -38,7 +38,8 @@ localedir = @localedir@ program_prefix = @program_prefix@ program_suffix = @program_suffix@ EXTRA_LIBES = @EXTRA_LIBES@ @LIBS@ -TEX_TFMDIR = @TEX_TFMDIR@ +TFM_PATH = @TFM_PATH@ +TFM_SUFFIXES = @TFM_SUFFIXES@ RANLIB = @RANLIB@ DEFS = @DEFS@ #SET_MAKE = @SET_MAKE@ diff --git a/flower/file-path.cc b/flower/file-path.cc index 5f430ce9a0..10df133946 100644 --- a/flower/file-path.cc +++ b/flower/file-path.cc @@ -110,10 +110,27 @@ File_path::find (String nm) const return ""; } +/** + Add an directory, return false if failed + */ +bool +File_path::try_add (String s) +{ + if (s == "") + s = "."; + FILE * f = fopen (s.ch_C(), "r"); + if (!f) + return false; + fclose (f); + + push (s); + return true; +} + void File_path::add (String s) { - push (s); + push (s); } String diff --git a/flower/include/file-path.hh b/flower/include/file-path.hh index 15c295ba4b..fdaf3e254a 100644 --- a/flower/include/file-path.hh +++ b/flower/include/file-path.hh @@ -30,7 +30,8 @@ public: Array::push; String str ()const; - void add (String str); + bool try_add (String str); + void add (String); void parse_path (String); }; diff --git a/lily/include/bar.hh b/lily/include/bar.hh index 6673cea6f9..bfb2ce7379 100644 --- a/lily/include/bar.hh +++ b/lily/include/bar.hh @@ -23,7 +23,7 @@ public: protected: virtual void before_line_breaking (); - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; virtual Real get_bar_size () const; }; #endif // BAR_HH diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 99eac088af..9021a08ab0 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -49,7 +49,7 @@ protected: virtual void before_line_breaking (); virtual void after_line_breaking (); - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const; private: diff --git a/lily/include/breathing-sign.hh b/lily/include/breathing-sign.hh index a2b0181d2b..6ecf02e263 100644 --- a/lily/include/breathing-sign.hh +++ b/lily/include/breathing-sign.hh @@ -26,7 +26,7 @@ public: Breathing_sign (SCM s); protected: virtual void after_line_breaking (); - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; }; #endif // BREATHING_SIGN_HH diff --git a/lily/include/chord-name.hh b/lily/include/chord-name.hh index 80bc855e43..d89e81c2e3 100644 --- a/lily/include/chord-name.hh +++ b/lily/include/chord-name.hh @@ -29,7 +29,7 @@ VIRTUAL_COPY_CONS (Score_element); Molecule ly_text2molecule (SCM scm) const; Chord_name(SCM s); protected: - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; }; diff --git a/lily/include/crescendo.hh b/lily/include/crescendo.hh index e43f005e61..a9d4576320 100644 --- a/lily/include/crescendo.hh +++ b/lily/include/crescendo.hh @@ -23,7 +23,7 @@ public: Crescendo(SCM); protected: VIRTUAL_COPY_CONS(Score_element); - virtual Molecule do_brew_molecule() const; + Molecule do_brew_molecule() const; private: Molecule get_symbol() const; diff --git a/lily/include/dots.hh b/lily/include/dots.hh index 8f33241c68..ace3555c6c 100644 --- a/lily/include/dots.hh +++ b/lily/include/dots.hh @@ -26,7 +26,7 @@ class Dots : public Item { protected: - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; virtual void after_line_breaking (); public: static SCM scheme_molecule (SCM); diff --git a/lily/include/extender-spanner.hh b/lily/include/extender-spanner.hh index b921217dbe..a86a3d0e03 100644 --- a/lily/include/extender-spanner.hh +++ b/lily/include/extender-spanner.hh @@ -36,7 +36,7 @@ public: protected: - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; void after_line_breaking (); VIRTUAL_COPY_CONS (Score_element); diff --git a/lily/include/hyphen-spanner.hh b/lily/include/hyphen-spanner.hh index 1270bce805..920c4c35fa 100644 --- a/lily/include/hyphen-spanner.hh +++ b/lily/include/hyphen-spanner.hh @@ -27,7 +27,7 @@ public: protected: - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; Interval do_height () const; void after_line_breaking (); diff --git a/lily/include/key-item.hh b/lily/include/key-item.hh index 67b1d6c935..8743259021 100644 --- a/lily/include/key-item.hh +++ b/lily/include/key-item.hh @@ -33,7 +33,7 @@ public: protected: - virtual Molecule do_brew_molecule() const; + Molecule do_brew_molecule() const; }; #endif // KEYITEM_HH diff --git a/lily/include/local-key-item.hh b/lily/include/local-key-item.hh index 400d7de2a7..ccedf0f9b7 100644 --- a/lily/include/local-key-item.hh +++ b/lily/include/local-key-item.hh @@ -46,7 +46,7 @@ public: void add_pitch (Musical_pitch, bool cautionary, bool natural); protected: virtual void before_line_breaking (); - virtual Molecule do_brew_molecule() const; + Molecule do_brew_molecule() const; }; #endif // LOCALKEYITEM_HH diff --git a/lily/include/multi-measure-rest.hh b/lily/include/multi-measure-rest.hh index eba41029b2..4349b8d3cf 100644 --- a/lily/include/multi-measure-rest.hh +++ b/lily/include/multi-measure-rest.hh @@ -23,7 +23,7 @@ public: void add_column (Item*); Molecule compound_rest (int)const; protected: - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; VIRTUAL_COPY_CONS (Score_element); virtual void do_add_processing (); diff --git a/lily/include/note-head.hh b/lily/include/note-head.hh index 0ce36022fc..eb86e46770 100644 --- a/lily/include/note-head.hh +++ b/lily/include/note-head.hh @@ -30,7 +30,7 @@ public: Note_head (SCM); protected: virtual void before_line_breaking (); - virtual Molecule do_brew_molecule() const; + Molecule do_brew_molecule() const; }; #endif // NOTEHEAD_HH diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 0b0ebef383..1977bd6738 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -23,7 +23,7 @@ class Rest : public Rhythmic_head { protected: virtual void after_line_breaking (); - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; public: static SCM scheme_molecule (SCM); diff --git a/lily/include/score-element.hh b/lily/include/score-element.hh index 276fe75e3e..2ded67f8cc 100644 --- a/lily/include/score-element.hh +++ b/lily/include/score-element.hh @@ -184,7 +184,7 @@ protected: ///executed directly after the item is added to the Paper_score virtual void do_add_processing (); - virtual Molecule do_brew_molecule ()const; + Molecule do_brew_molecule ()const; static Interval dim_cache_callback (Dimension_cache const*); @@ -245,14 +245,7 @@ public: Score_element * unsmob_element (SCM); -#define MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(TYPE) \ -SCM \ -TYPE::scheme_molecule (SCM smob) \ -{ \ - TYPE * b = dynamic_cast (unsmob_element (smob)); \ - return b ? b->do_brew_molecule ().create_scheme () : SCM_EOL; \ -} \ - \ +#define MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(TYPE) \ void \ TYPE ## __init_functions () \ { \ @@ -262,6 +255,16 @@ TYPE ## __init_functions () \ \ ADD_SCM_INIT_FUNC(TYPE ## _molecule, TYPE ## __init_functions); \ +#define MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(TYPE) \ +MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(TYPE);\ +SCM \ +TYPE::scheme_molecule (SCM smob) \ +{ \ + TYPE * b = dynamic_cast (unsmob_element (smob)); \ + return b ? b->do_brew_molecule ().create_scheme () : SCM_EOL; \ +} \ + \ + #endif // STAFFELEM_HH diff --git a/lily/include/slur.hh b/lily/include/slur.hh index a44f1f4bd4..9a71f42d3f 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -25,7 +25,7 @@ public: protected: - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; virtual Array get_encompass_offset_arr () const; Bezier get_curve () const; Drul_array dy_f_drul_; diff --git a/lily/include/staff-symbol.hh b/lily/include/staff-symbol.hh index 4ed5b22af0..98478d5c36 100644 --- a/lily/include/staff-symbol.hh +++ b/lily/include/staff-symbol.hh @@ -27,7 +27,7 @@ public: protected: VIRTUAL_COPY_CONS(Score_element); - virtual Molecule do_brew_molecule() const; + Molecule do_brew_molecule() const; }; #endif // STAFFSYM_HH diff --git a/lily/include/stem-tremolo.hh b/lily/include/stem-tremolo.hh index ec2e7b4426..97cbd2c690 100644 --- a/lily/include/stem-tremolo.hh +++ b/lily/include/stem-tremolo.hh @@ -16,7 +16,7 @@ class Stem_tremolo : public Item { protected: Stem * stem_l () const; - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; static Interval dim_callback (Score_element*, Axis); public: diff --git a/lily/include/stem.hh b/lily/include/stem.hh index 44d054f011..ea208ff792 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -93,7 +93,7 @@ protected: virtual void before_line_breaking(); static Interval dim_callback (Score_element const*,Axis); - virtual Molecule do_brew_molecule() const; + Molecule do_brew_molecule() const; void set_spacing_hints () ; }; diff --git a/lily/include/sustain-pedal.hh b/lily/include/sustain-pedal.hh index 505723c316..fe1a314746 100644 --- a/lily/include/sustain-pedal.hh +++ b/lily/include/sustain-pedal.hh @@ -33,10 +33,10 @@ class Sustain_pedal : public Item public: static SCM scheme_molecule (SCM); -VIRTUAL_COPY_CONS (Score_element); + VIRTUAL_COPY_CONS (Score_element); Sustain_pedal (SCM); protected: - virtual Molecule do_brew_molecule () const; + // Molecule do_brew_molecule () const; virtual void after_line_breaking (); }; diff --git a/lily/include/text-item.hh b/lily/include/text-item.hh index d70347307a..d69a23f0af 100644 --- a/lily/include/text-item.hh +++ b/lily/include/text-item.hh @@ -23,7 +23,7 @@ public: Text_item (SCM s); protected: - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; }; #endif /* Text_ITEM_HH */ diff --git a/lily/include/tie.hh b/lily/include/tie.hh index 71e0e86c87..c6fc1c8904 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -31,7 +31,7 @@ public: virtual Direction get_default_dir() const; protected: - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; virtual Array get_encompass_offset_arr () const; Bezier get_curve () const; diff --git a/lily/include/time-signature.hh b/lily/include/time-signature.hh index ac4a49f237..ea338b29a4 100644 --- a/lily/include/time-signature.hh +++ b/lily/include/time-signature.hh @@ -24,7 +24,7 @@ class Time_signature: public Item Molecule time_signature (int, int)const; protected: - virtual Molecule do_brew_molecule() const; + Molecule do_brew_molecule() const; public: Time_signature (SCM); static SCM scheme_molecule (SCM); diff --git a/lily/include/tuplet-spanner.hh b/lily/include/tuplet-spanner.hh index e7390afbf2..ca725e5d40 100644 --- a/lily/include/tuplet-spanner.hh +++ b/lily/include/tuplet-spanner.hh @@ -30,7 +30,7 @@ protected: void calc_dy (Real *) const; void calc_position_and_height (Real*,Real *dy)const; - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; VIRTUAL_COPY_CONS(Score_element); virtual void do_add_processing (); virtual void after_line_breaking (); diff --git a/lily/include/volta-spanner.hh b/lily/include/volta-spanner.hh index a9a05605da..40c2195a44 100644 --- a/lily/include/volta-spanner.hh +++ b/lily/include/volta-spanner.hh @@ -22,7 +22,7 @@ public: void add_bar (Bar*); protected: - virtual Molecule do_brew_molecule () const; + Molecule do_brew_molecule () const; VIRTUAL_COPY_CONS (Score_element); virtual void do_add_processing (); diff --git a/lily/main.cc b/lily/main.cc index fcbd09e5c6..3bade16b9d 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -217,13 +217,21 @@ setup_paths () global_path.parse_path (env_sz); - char *suffixes[] = {"ly", "afm", "scm", "tfm", "cmtfm", "ps", 0}; + /* + Should use kpathsea, this is getting out of hand. + */ + char *suffixes[] = {"ly", "afm", "scm", "tfm", "ps", 0}; + String prefix = prefix_directory; + if (prefix.empty_b ()) prefix = DIR_DATADIR; for (char **s = suffixes; *s; s++) { - if (!prefix_directory.empty_b()) - global_path.add (prefix_directory + to_str ('/') + String (*s)); - else - global_path.add (String (DIR_DATADIR) + to_str ('/') + String(*s)); + String p = prefix + to_str ('/') + String (*s); + + global_path.add (p); + /* Urg: GNU make's $(word) index starts at 1 */ + int i = 1; + while (global_path.try_add (p + to_str (".") + to_str (i))) + i++; } } diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index e51fff1c6e..b8a69703a7 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -181,27 +181,24 @@ Piano_pedal_engraver::do_process_music () s = get_property ("start" + String (p->name_ )); } - if (s != SCM_UNDEFINED) + if (gh_string_p (s)) { if (p->name_ == String ("Sustain")) { - p->item_p_ = new Sustain_pedal (SCM_EOL); - p->item_p_->set_elt_property ("text", s); + // fixme: Item should be sufficient. + p->item_p_ = new Text_item (get_property ("basicSustainPedalProperties")); } else { - p->item_p_ = new Text_item (SCM_EOL); + p->item_p_ = new Text_item (get_property ("basicPedalProperties")); + } p->item_p_->set_elt_property ("text", s); // guh - p->item_p_->set_elt_property ("style", ly_str02scm ("italic")); - } Side_position_interface si (p->item_p_); si.set_axis (Y_AXIS); // todo: init with basic props. - p->item_p_->set_elt_property ("no-spacing-rods" , SCM_BOOL_T); - p->item_p_->set_elt_property ("self-alignment-X", gh_int2scm (0)); p->item_p_->add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS); p->item_p_->add_offset_callback (Side_position_interface::centered_on_parent, X_AXIS); announce_element (Score_element_info (p->item_p_, diff --git a/lily/sustain-pedal.cc b/lily/sustain-pedal.cc index 9ee9a2905b..93e454441c 100644 --- a/lily/sustain-pedal.cc +++ b/lily/sustain-pedal.cc @@ -16,6 +16,7 @@ void Sustain_pedal::after_line_breaking () { + return ; /* UGH. Should work automatically via offset callback. */ @@ -24,31 +25,36 @@ Sustain_pedal::after_line_breaking () i.set_direction (d); } -Molecule -Sustain_pedal::do_brew_molecule () const +MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Sustain_pedal); + + +SCM +Sustain_pedal::scheme_molecule (SCM smob) { + Score_element * e = unsmob_element (smob); + Molecule mol; - SCM glyph = get_elt_property ("text"); - if (glyph == SCM_UNDEFINED) - return mol; + SCM glyph = e->get_elt_property ("text"); + if (!gh_string_p (glyph)) + return mol.create_scheme(); String text = ly_scm2string (glyph); for (int i = 0; i < text.length_i (); i++) { String idx ("pedal-"); - if (text.cut_str (i, i + 2) == "Ped") + if (text.cut_str (i, 3) == "Ped") { idx += "Ped"; i += 2; } else idx += String (&text.byte_C ()[i], 1); - Molecule m = lookup_l ()->afm_find (idx); + Molecule m = e->lookup_l ()->afm_find (idx); if (!m.empty_b ()) mol.add_at_edge (X_AXIS, RIGHT, m, 0); } - return mol; + return mol.create_scheme (); } Sustain_pedal ::Sustain_pedal(SCM s ) diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 1977615919..f02cab53d5 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -112,9 +112,8 @@ System_start_delimiter::staff_brace (Real y) const int idx = int (((maxht - step) ? 0; - SCM l = scm_eval (gh_list (ly_symbol2scm ("style-to-cmr"), - ly_str02scm ("brace"), - SCM_UNDEFINED)); + SCM l = scm_assoc (ly_str02scm ("brace"), + scm_eval (ly_symbol2scm ("cmr-alist"))); String nm = "feta-braces"; if (l != SCM_BOOL_F) diff --git a/ly/engraver.ly b/ly/engraver.ly index ba8064a104..8adf113a50 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -152,6 +152,7 @@ VoiceContext = \translator { stopStartSustain = #"*Ped." startUnaChorda = #"una chorda" stopUnaChorda = #"tre chorde" + \consists "Piano_pedal_engraver"; \consists "Script_engraver"; \consists "Script_column_engraver"; @@ -490,6 +491,13 @@ ScoreContext = \translator { (molecule-callback . ,Text_item::scheme_molecule) (style . "italic") ) + basicPedalProperties = #`( + (molecule-callback . ,Text_item::scheme_molecule) + (style . "italic") + (no-spacing-rods . #t) + (self-alignment-X . 0) + + ) basicTextProperties = #`( ) basicRestProperties = #`( (molecule-callback . ,Rest::scheme_molecule) @@ -504,7 +512,11 @@ ScoreContext = \translator { basicSlurProperties = #`( (molecule-callback . ,Slur::scheme_molecule) ) - + basicSustainPedalProperties = #`( + (no-spacing-rods . #t) + (molecule-callback . ,Sustain_pedal::scheme_molecule) + (self-alignment-X . 0) + ) basicSystemStartDelimiterProperties = #`( (molecule-callback . ,System_start_delimiter::scheme_molecule) (collapse-height . 1.0) diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 5b9e2b90bd..9cc19ff4b5 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -51,10 +51,11 @@ examples: tar --exclude='*.dvi' --exclude='*.tex' --exclude='*.ps' --exclude='*.ppm' -czf $(outdir)/examples.tar.gz *-examples.html `find input mutopia -type d -name 'out-www' -print` + +my_tfm_path=$(TFM_PATH) /tmp /tmp /tmp /tmp /tmp /tmp localinstall: mkdir -p $(datadir) - rm -f $(datadir)/cmtfm - $(LN_S) $(TEX_TFMDIR) $(datadir)/cmtfm + $(foreach i, 1 2 3 4 5, rm -f $(datadir)/tfm.$(i); $(LN_S) $(word $(i), $(my_tfm_path)) $(datadir)/tfm.$(i) ; ) local-WWW-clean: $(SHELL) $(depth)/buildscripts/clean-fonts.sh diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 3e488a8f4f..25ba3293eb 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -553,26 +553,33 @@ AC_DEFUN(XXAC_STEPMAKE_TEXMF_DIRS, [ ]) AC_DEFUN(AC_STEPMAKE_TEXMF_DIRS, [ - AC_ARG_ENABLE(tex-tfmdir, - [ enable-tex-tfmdir=DIR set the tex-directory where cmr10.tfm lives (default: use kpsewhich)], - [TFMDIR=$enableval], - [TFMDIR=auto] ) + AC_ARG_ENABLE(tfm-path, + [ enable-tfm-path=PATH set path of tex directories where tfm files live, esp.: cmr10.tfm (default: use kpsewhich)], + [tfm_path=$enableval], + [tfm_path=auto] ) AC_CHECK_PROGS(KPSEWHICH, kpsewhich, no) - AC_MSG_CHECKING(for TeX TFM directory) - if test "x$TFMDIR" = xauto ; then - if test "x$TEX_TFMDIR" = "x" ; then - if test "x$KPSEWHICH" != "xno" ; then - CMR10=`kpsewhich tfm cmr10.tfm` - TEX_TFMDIR=`dirname $CMR10` - else - AC_STEPMAKE_WARN(Please set TEX_TFMDIR (to where cmr10.tfm lives): - TEX_TFMDIR=/usr/local/TeX/lib/tex/fonts ./configure) - fi + AC_MSG_CHECKING(for tfm path) + + TFM_FONTS="cmr msam" + + if test "x$tfm_path" = xauto ; then + if test "x$KPSEWHICH" != "xno" ; then + for i in $TFM_FONTS; do + dir=`$KPSEWHICH tfm ${i}10.tfm` + TFM_PATH="$TFM_PATH `dirname $dir`" + done + else + AC_STEPMAKE_WARN(Please specify where cmr10.tfm lives: + ./configure --enable-tfm-path=/usr/local/TeX/lib/tex/fonts) fi + else + TFM_PATH=$tfm_path fi - AC_MSG_RESULT($TEX_TFMDIR) - AC_SUBST(TEX_TFMDIR) + + TFM_PATH=`echo $TFM_PATH | tr ':' ' '` + AC_MSG_RESULT($TFM_PATH) + AC_SUBST(TFM_PATH) ]) AC_DEFUN(AC_STEPMAKE_TEXMF, [ -- 2.39.2