+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
===========
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.
-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
])
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, [
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
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
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
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 &
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@
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
Array<String>::push;
String str ()const;
- void add (String str);
+ bool try_add (String str);
+ void add (String);
void parse_path (String);
};
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
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:
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
Molecule ly_text2molecule (SCM scm) const;
Chord_name(SCM s);
protected:
- virtual Molecule do_brew_molecule () const;
+ Molecule do_brew_molecule () const;
};
Crescendo(SCM);
protected:
VIRTUAL_COPY_CONS(Score_element);
- virtual Molecule do_brew_molecule() const;
+ Molecule do_brew_molecule() const;
private:
Molecule get_symbol() const;
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);
protected:
- virtual Molecule do_brew_molecule () const;
+ Molecule do_brew_molecule () const;
void after_line_breaking ();
VIRTUAL_COPY_CONS (Score_element);
protected:
- virtual Molecule do_brew_molecule () const;
+ Molecule do_brew_molecule () const;
Interval do_height () const;
void after_line_breaking ();
protected:
- virtual Molecule do_brew_molecule() const;
+ Molecule do_brew_molecule() const;
};
#endif // KEYITEM_HH
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
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 ();
Note_head (SCM);
protected:
virtual void before_line_breaking ();
- virtual Molecule do_brew_molecule() const;
+ Molecule do_brew_molecule() const;
};
#endif // NOTEHEAD_HH
{
protected:
virtual void after_line_breaking ();
- virtual Molecule do_brew_molecule () const;
+ Molecule do_brew_molecule () const;
public:
static SCM scheme_molecule (SCM);
///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*);
Score_element * unsmob_element (SCM);
-#define MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(TYPE) \
-SCM \
-TYPE::scheme_molecule (SCM smob) \
-{ \
- TYPE * b = dynamic_cast<TYPE*> (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 () \
{ \
\
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<TYPE*> (unsmob_element (smob)); \
+ return b ? b->do_brew_molecule ().create_scheme () : SCM_EOL; \
+} \
+ \
+
#endif // STAFFELEM_HH
protected:
- virtual Molecule do_brew_molecule () const;
+ Molecule do_brew_molecule () const;
virtual Array<Offset> get_encompass_offset_arr () const;
Bezier get_curve () const;
Drul_array<Real> dy_f_drul_;
protected:
VIRTUAL_COPY_CONS(Score_element);
- virtual Molecule do_brew_molecule() const;
+ Molecule do_brew_molecule() const;
};
#endif // STAFFSYM_HH
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:
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 () ;
};
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 ();
};
Text_item (SCM s);
protected:
- virtual Molecule do_brew_molecule () const;
+ Molecule do_brew_molecule () const;
};
#endif /* Text_ITEM_HH */
virtual Direction get_default_dir() const;
protected:
- virtual Molecule do_brew_molecule () const;
+ Molecule do_brew_molecule () const;
virtual Array<Offset> get_encompass_offset_arr () const;
Bezier get_curve () const;
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);
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 ();
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 ();
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++;
}
}
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_,
void
Sustain_pedal::after_line_breaking ()
{
+ return ;
/*
UGH. Should work automatically via offset callback.
*/
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 )
int idx = int (((maxht - step) <? y - minht) / step);
idx = idx >? 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)
stopStartSustain = #"*Ped."
startUnaChorda = #"una chorda"
stopUnaChorda = #"tre chorde"
+
\consists "Piano_pedal_engraver";
\consists "Script_engraver";
\consists "Script_column_engraver";
(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)
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)
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
])
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, [