From 0c480b1cbb4fa93c91204209252f08d31b594a71 Mon Sep 17 00:00:00 2001
From: hanwen <hanwen>
Date: Sat, 3 Jan 2004 01:59:58 +0000
Subject: [PATCH] * lily/beam.cc (brew_molecule): rewrite debug output: split
 up scores.

* scm/define-grobs.scm (all-grob-descriptions): use semi-fixed
space after barline.

* mf/feta-eindelijk.mf (tracingvariables): make top of 8th rest fatter.

* lily/spacing-spanner.cc (breakable_column_spacing): take average
of spacing wishes, not maximum. Only do this for delta-t == 0. In
the other case, take standard column-breakable spacing. Do not
warn about "no spacing wishes".

* lily/multi-measure-rest.cc (big_rest): bugfix for blots.
---
 ChangeLog                                  |  34 ++++++
 Documentation/user/invoking.itexi          |   3 +-
 VERSION                                    |   2 +-
 input/mutopia/F.Schubert/morgenlied.ly     |   8 +-
 input/mutopia/R.Schumann/romanze-op28-2.ly |   2 +-
 lily/arpeggio.cc                           |   2 +-
 lily/bar-line.cc                           |   5 +-
 lily/beam-quanting.cc                      |  37 ++++--
 lily/beam.cc                               |  14 +--
 lily/horizontal-bracket.cc                 |   5 +-
 lily/hyphen-engraver.cc                    |   7 +-
 lily/hyphen-spanner.cc                     | 129 ++++++--------------
 lily/include/beam.hh                       |   1 -
 lily/include/hyphen-spanner.hh             |   3 -
 lily/include/lookup.hh                     |   6 +-
 lily/include/paper-def.hh                  |   1 -
 lily/include/separation-item.hh            |   3 +-
 lily/include/staff-spacing.hh              |   1 -
 lily/lookup.cc                             |  25 ++--
 lily/lyric-extender.cc                     |   3 +-
 lily/measure-grouping-spanner.cc           |   2 +-
 lily/mensural-ligature.cc                  |   2 +-
 lily/multi-measure-rest.cc                 |  17 +--
 lily/note-spacing.cc                       |   2 +-
 lily/paper-column.cc                       |   2 +-
 lily/separation-item.cc                    |  35 ++++++
 lily/spacing-spanner.cc                    | 133 +++++++++++----------
 lily/staff-spacing.cc                      |  65 ++++------
 lily/stanza-number-engraver.cc             |   2 +-
 lily/stem.cc                               |   2 +-
 lily/system-start-delimiter.cc             |   7 +-
 lily/vaticana-ligature.cc                  |   4 +-
 mf/feta-eindelijk.mf                       |   8 +-
 mf/feta-test-generic.mf                    |   4 +-
 scm/define-grob-properties.scm             |   1 -
 scm/define-grobs.scm                       |  46 ++++---
 scm/new-markup.scm                         |  10 +-
 37 files changed, 328 insertions(+), 305 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e69eca0b98..8edfd29306 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,39 @@
+2004-01-03  Han-Wen Nienhuys   <hanwen@cs.uu.nl>
+
+	* lily/beam.cc (brew_molecule): rewrite debug output: split up scores.
+
+	* scm/define-grobs.scm (all-grob-descriptions): use semi-fixed
+	space after barline.
+
+	* mf/feta-eindelijk.mf (tracingvariables): make top of 8th rest fatter.
+
+	* lily/spacing-spanner.cc (breakable_column_spacing): take average
+	of spacing wishes, not maximum. Only do this for delta-t == 0. In
+	the other case, take standard column-breakable spacing. Do not
+	warn about "no spacing wishes".
+
+	This fixes wide spaces after barlines in very loose lines.
+
+	* lily/multi-measure-rest.cc (big_rest): bugfix for blots.
+
 2004-01-02  Han-Wen Nienhuys   <hanwen@cs.uu.nl>
 
+	* lily/stanza-number-engraver.cc (acknowledge_grob): bugfix:
+	acknowledge_grob lyric-syllable, not lyric-text.
+
+	* lily/hyphen-spanner.cc (brew_molecule): rewrite. Make multiple
+	dashes of length #'length separated by #'dash-period. 
+
+	* lily/lyric-extender.cc (brew_molecule): idem
+
+	* lily/multi-measure-rest.cc (big_rest): idem
+
+	* lily/system-start-delimiter.cc (simple_bar): idem
+
+	* lily/bar-line.cc (simple_barline): use rounded box
+
+	* VERSION: release 2.1.5
+
 	* Documentation/user/lilypond-book.itely (Integrating LaTeX and
 	music): move note about dvips to more visible place.
 
diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi
index 7beb95724e..cc7079a4f4 100644
--- a/Documentation/user/invoking.itexi
+++ b/Documentation/user/invoking.itexi
@@ -84,7 +84,8 @@ in the files. Possible keys: @code{language}, @code{latexheaders},
 @item -v,--version
 Show version information.
 @item -V,--verbose
-Be verbose.
+Be verbose. This prints out commands as they are executed, and more
+information about the formatting process is printed.
 @item --debug
 Print even more information. This is useful when generating bugreports.
 @item -w,--warranty
diff --git a/VERSION b/VERSION
index ddf68a2fd3..70e82d4388 100644
--- a/VERSION
+++ b/VERSION
@@ -2,5 +2,5 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=1
 PATCH_LEVEL=5
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=hwn1
 
diff --git a/input/mutopia/F.Schubert/morgenlied.ly b/input/mutopia/F.Schubert/morgenlied.ly
index 96d4eafe67..64d5b3466b 100644
--- a/input/mutopia/F.Schubert/morgenlied.ly
+++ b/input/mutopia/F.Schubert/morgenlied.ly
@@ -44,7 +44,7 @@ modernAccidentals = {
 melody = \notes   \relative c'' \repeat volta 2 \context Voice = singer {
     \time 6/8
     \autoBeamOff
-    s1*0^\markup { \bold \bigger\bigger { \hspace #-3.0 Lieblich, etwas geschwind } }
+    s1*0^\markup { \bold \large\bigger\bigger { \hspace #-3.0 Lieblich, etwas geschwind } }
   R2.
   r4 r8 c4 g8 |
   e4 c8 << { f8. g16 } \\ { f8.[ g16] } >> a8 |
@@ -60,7 +60,9 @@ melody = \notes   \relative c'' \repeat volta 2 \context Voice = singer {
   e4 g8 d4 g8 e4 r8 b'16[ c d b] g[ f] |
   e4 g8 d4 a'16[ g] |
   c,4 r8 r4 r8 |
-  R2.\fermata 
+
+    % TODO : make \fermata work. 
+  R2.^\fermataMarkup 
 }
 
 
@@ -145,7 +147,7 @@ pianoLH = \notes \relative c'' \repeat volta 2 {
     \paper {
 	\translator {
 	    \LyricsVoiceContext
-	    minimumVerticalExtent = ##f
+	    minimumVerticalExtent = #'(-1.0 . 0)
 	    LyricText \set #'font-size = #1.0
 	}
 	\translator {
diff --git a/input/mutopia/R.Schumann/romanze-op28-2.ly b/input/mutopia/R.Schumann/romanze-op28-2.ly
index 422109c2d5..b7ec743366 100644
--- a/input/mutopia/R.Schumann/romanze-op28-2.ly
+++ b/input/mutopia/R.Schumann/romanze-op28-2.ly
@@ -3,7 +3,7 @@
 
 \include "deutsch.ly"
 
-\include "paper19.ly"
+\include "paper16.ly"
 \version "2.1.1"
 
 \header {
diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc
index aa14910a2d..4eef3d8caf 100644
--- a/lily/arpeggio.cc
+++ b/lily/arpeggio.cc
@@ -128,7 +128,7 @@ Arpeggio::brew_chord_bracket (SCM smob)
   Real dy = heads.length() + sp;
   Real x = 0.7;
 
-  Molecule mol (Lookup::bracket (Y_AXIS, Interval (0, dy), lt, x));
+  Molecule mol (Lookup::bracket (Y_AXIS, Interval (0, dy), lt, x, lt));
   mol.translate_axis (heads[LEFT] - sp/2.0, Y_AXIS);
   return mol.smobbed_copy();
 }
diff --git a/lily/bar-line.cc b/lily/bar-line.cc
index cf1999356d..82fdf74bdc 100644
--- a/lily/bar-line.cc
+++ b/lily/bar-line.cc
@@ -130,9 +130,10 @@ Bar_line::compound_barline (Grob*me, String str, Real h)
 }
 
 Molecule
-Bar_line::simple_barline (Grob*,Real w, Real h) 
+Bar_line::simple_barline (Grob *me,Real w, Real h) 
 {
-  return Lookup::filledbox (Box (Interval (0,w), Interval (-h/2, h/2)));
+  Real blot = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
+  return Lookup::round_filled_box (Box (Interval (0,w), Interval (-h/2, h/2)), blot);
 }
 
 MAKE_SCHEME_CALLBACK (Bar_line,before_line_breaking ,1);
diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc
index 9576f33cce..b4efc0a3bc 100644
--- a/lily/beam-quanting.cc
+++ b/lily/beam-quanting.cc
@@ -30,6 +30,8 @@ const int DAMPING_DIRECTIION_PENALTY = 800;
 const int MUSICAL_DIRECTION_FACTOR = 400;
 const int IDEAL_SLOPE_FACTOR = 10;
 
+#define DEBUG_QUANTING 1
+
 
 static Real
 shrink_extra_weight (Real x, Real fac)
@@ -43,6 +45,10 @@ struct Quant_score
   Real yl;
   Real yr;
   Real demerits;
+
+#if DEBUG_QUANTING
+  String score_card_;
+#endif
 };
 
 
@@ -203,9 +209,13 @@ Beam::quanting (SCM smob)
      parameters outside of the loop, we can save a lot of time. */
   for (int i = qscores.size (); i--;)
     {
-      qscores[i].demerits
-	+= score_slopes_dy (qscores[i].yl, qscores[i].yr,
-			    dy_mus, yr- yl, xstaff); 
+      Real d =  score_slopes_dy (qscores[i].yl, qscores[i].yr,
+				 dy_mus, yr- yl, xstaff);
+      qscores[i].demerits += d;
+
+#if DEBUG_QUANTING
+      qscores[i].score_card_ += to_string ("S%.2f",d);
+#endif
     }
 
   Real rad = Staff_symbol_referencer::staff_radius (me);
@@ -216,34 +226,43 @@ Beam::quanting (SCM smob)
   for (int i = qscores.size (); i--;)
     if (qscores[i].demerits < reasonable_score)
       {
-	qscores[i].demerits
-	  += score_forbidden_quants (qscores[i].yl, qscores[i].yr,
+	Real d = score_forbidden_quants (qscores[i].yl, qscores[i].yr,
 				     rad, slt, thickness, beam_translation,
 				     beam_count, ldir, rdir); 
+	qscores[i].demerits += d;
+
+#if DEBUG_QUANTING
+	qscores[i].score_card_ += to_string (" F %.2f", d);
+#endif
       }
 
   for (int i = qscores.size (); i--;)
     if (qscores[i].demerits < reasonable_score)
       {
-	qscores[i].demerits
-	  += score_stem_lengths (stems, stem_infos,
+	Real d=score_stem_lengths (stems, stem_infos,
 				 base_lengths, stem_xposns,
 				 xl, xr,
 				 knee_b,
 				 qscores[i].yl, qscores[i].yr);
+	qscores[i].demerits +=  d;
+
+#if DEBUG_QUANTING
+	qscores[i].score_card_ += to_string (" L %.2f", d);
+#endif
       }
 
   int best_idx = best_quant_score_idx (qscores);
+
+  
   me->set_grob_property ("positions",
 			 gh_cons (gh_double2scm (qscores[best_idx].yl),
 				  gh_double2scm (qscores[best_idx].yr))
 			 );
 
 #if DEBUG_QUANTING
-
   // debug quanting
   me->set_grob_property ("quant-score",
-			 gh_double2scm (qscores[best_idx].demerits));
+			 scm_makfrom0str (qscores[best_idx].score_card_.to_str0 ()));
   me->set_grob_property ("best-idx", scm_int2num (best_idx));
 #endif
 
diff --git a/lily/beam.cc b/lily/beam.cc
index 6f509ce91b..0db377d090 100644
--- a/lily/beam.cc
+++ b/lily/beam.cc
@@ -44,7 +44,7 @@ Notes:
 #include "warn.hh"
 
 
-#define DEBUG_QUANTING 0
+#define DEBUG_QUANTING 1
 
 
 #if DEBUG_QUANTING
@@ -492,18 +492,10 @@ Beam::brew_molecule (SCM grob)
 	parameters.
       */
       String str;
-      if (1)
-	{
-	  str += to_string (gh_scm2int (me->get_grob_property ("best-idx")));
-	  str += ":";
-	}
-      str += to_string (gh_scm2double (me->get_grob_property ("quant-score")),
-		     "%.2f");
-
       SCM properties = Font_interface::font_alist_chain (me);
 
-      Molecule tm = Text_item::interpret_new_markup
-	(me->self_scm(),  properties, scm_makfrom0str (str.to_str0 ()));
+      Molecule tm = *unsmob_molecule (Text_item::interpret_markup
+	(me->get_paper ()->self_scm (), properties, me->get_grob_property ("quant-score")));
       the_beam.add_at_edge (Y_AXIS, UP, tm, 5.0, 0);
     }
 #endif
diff --git a/lily/horizontal-bracket.cc b/lily/horizontal-bracket.cc
index 6f4dbc09db..a172d85358 100644
--- a/lily/horizontal-bracket.cc
+++ b/lily/horizontal-bracket.cc
@@ -51,13 +51,14 @@ Horizontal_bracket::brew_molecule (SCM smob)
   ext.unite (gs[0]->extent (cx, X_AXIS));
 
   Direction d = get_grob_direction (me);
-  Real t = me->get_paper()->get_realvar (ly_symbol2scm ("linethickness"));
+  Real lt =me->get_paper()->get_realvar (ly_symbol2scm ("linethickness"));
+  Real t = lt;
 
   SCM lthick = me->get_grob_property ("thickness");
   if (gh_number_p (lthick))
     t *= gh_scm2double (lthick);
   
-  Molecule b = Lookup::bracket (X_AXIS, ext, t, - d* 1.0); 
+  Molecule b = Lookup::bracket (X_AXIS, ext, t, - d* 1.0, lt); 
   
   b.translate_axis ( - sp->get_bound (LEFT)->relative_coordinate (cx, X_AXIS), X_AXIS);
 
diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc
index db20eb02b6..b5f7fd1e2c 100644
--- a/lily/hyphen-engraver.cc
+++ b/lily/hyphen-engraver.cc
@@ -60,10 +60,9 @@ Hyphen_engraver::acknowledge_grob (Grob_info i)
     {
       current_lyric_ = i.grob_;
       if (hyphen_
-	  && !hyphen_->get_bound (RIGHT)
-	    )
+	  && !hyphen_->get_bound (RIGHT))
 	  {
-	    Hyphen_spanner (hyphen_).set_textitem (RIGHT, i.grob_);
+	    hyphen_->set_bound (RIGHT, i.grob_);
 	  }
     }
 }
@@ -102,7 +101,7 @@ Hyphen_engraver::process_acknowledged_grobs ()
       
       hyphen_ = new Spanner (get_property ("LyricHyphen"));
 
-      Hyphen_spanner (hyphen_).set_textitem (LEFT, last_lyric_);
+      hyphen_->set_bound (LEFT, last_lyric_);
       announce_grob(hyphen_, req_->self_scm());
     }
 }
diff --git a/lily/hyphen-spanner.cc b/lily/hyphen-spanner.cc
index 094137bef7..536ff6feb8 100644
--- a/lily/hyphen-spanner.cc
+++ b/lily/hyphen-spanner.cc
@@ -20,48 +20,24 @@
 #include "item.hh"
 
 
-MAKE_SCHEME_CALLBACK (Hyphen_spanner,set_spacing_rods,1);
-SCM
-Hyphen_spanner::set_spacing_rods (SCM smob)
-{
-  Grob*me = unsmob_grob (smob);
-
-  Rod rod;
-  Spanner*sp = dynamic_cast<Spanner*> (me);
-  Item * l = sp->get_bound (LEFT);
-  Item * r =  sp->get_bound (RIGHT);
-  rod.item_l_drul_[LEFT] = l;
-  rod.item_l_drul_[RIGHT] =r;
-  rod.distance_ =
-    gh_scm2double (me->get_grob_property ("minimum-length"))
-    + l->extent (l, X_AXIS)[RIGHT]
-    - r->extent (r, X_AXIS)[LEFT];
-
-  rod.add_to_cols ();
-  return SCM_UNSPECIFIED;
-}
-
 MAKE_SCHEME_CALLBACK (Hyphen_spanner,brew_molecule,1)
 SCM 
 Hyphen_spanner::brew_molecule (SCM smob)
 {
   Spanner * sp = unsmob_spanner (smob);
+  Drul_array<Item*> bounds (sp->get_bound (LEFT),
+			    sp->get_bound (RIGHT));
+  
+  Grob * common = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS);
 
-  Grob * common = sp;
+  Interval span_points;
   Direction d = LEFT;
   do
     {
-      common = common->common_refpoint (sp->get_bound (d), X_AXIS);
-    }
-  while (flip (&d) != LEFT);
-  Interval bounds;
-  
-  do
-    {
-      Interval iv = sp->get_bound (d)->extent (common, X_AXIS);
+      Interval iv = bounds[d]->extent (common, X_AXIS);
 
-      bounds[d] = iv.is_empty ()
-	? sp->get_bound (d)->relative_coordinate (common, X_AXIS)
+      span_points[d] = iv.is_empty ()
+	? bounds[d]->relative_coordinate (common, X_AXIS)
 	: iv[-d];
     }
   while (flip (&d) != LEFT);
@@ -71,81 +47,44 @@ Hyphen_spanner::brew_molecule (SCM smob)
   Real h = gh_scm2double (sp->get_grob_property ("height"));
 
   // interval?
-  Real x = gh_scm2double (sp->get_grob_property ("maximum-length"));
-  SCM space =  sp->get_bound (LEFT)->get_grob_property ("word-space");
+  
+  Real dp = gh_scm2double (sp->get_grob_property ("dash-period"));
+  Real dl = gh_scm2double (sp->get_grob_property ("length"));
 
-  Real word_space  = 1.0;
-  if (gh_number_p (space))
-    {
-      word_space = gh_scm2double (space);
-    }
+  if (dp < dl)
+    dp = 1.5 * dl;
+
+  Real l = span_points.length ();
+  int n = int (ceil (l/dp - 0.5));
+  if (n <= 0)
+    n = 1;
+
+  Real space_left = l - dl - (n-1)* dp;
 
   /*
-    We remove word space from the distance so it doesn't look like an extender.
-    
+    If there is not enough space, the hyphen should disappear.
    */
-  Real l = (gh_scm2double (sp->get_grob_property ("minimum-length"))
-    - word_space ) >? word_space;
-  
-  
-  /*
-    we should probably do something more intelligent when bounds is
-    empty, but at least this doesn't crash.
-  */      
-  Real w  = bounds.is_empty () ? 0 : bounds.length ();
+  if (space_left < 0)
+    return SCM_EOL;
   
-  /* for length, use a geometric mean of the available space and some minimum
-   */
-  if (l < w)
-    {
-      l = sqrt (l*w);
-      if (l > x)
-	l = x;
-    }
-  else
+  Box b (Interval (0, dl), Interval (h,h+th));
+  Molecule dash_mol (Lookup::round_filled_box (b, 0.8 * lt));
+
+  Molecule total;
+  for (int i = 0; i < n; i++)
     {
-      /* OK, we have a problem. Usually this means that we're on the
-         first column, and we have a long lyric which extends to near
-         the offset for stuff */
-      /* This test for being on the first column has been shamelessly
-         ripped from spanner.cc */
-      Paper_column *sc = dynamic_cast<Paper_column*> (sp->get_bound (LEFT)->get_column ());
-      if (sc != NULL &&
-	  sc->break_status_dir () == RIGHT)
-	{
-	  /* We are on the first column, so it's probably harmless to
-             get the minimum length back by extending leftwards into
-             the space under the clef/key sig/time sig */
-	  bounds[LEFT] = bounds[RIGHT] - l;
-	}
-      else 
-	{
-	  /* We can't get the length desired. Maybe we should warn. */
-	  l = w;
-	}
+      Molecule m (dash_mol);
+      m.translate_axis (span_points[LEFT] + i * dp + space_left / 2, X_AXIS);
+      total.add_molecule (m);
     }
-  Box b (Interval (-l/2,l/2), Interval (h,h+th));
-  Molecule mol (Lookup::filledbox (b));
-  Real ct = bounds.is_empty () ? 0 : bounds.center () ;
-  mol.translate_axis (ct -sp->relative_coordinate (common, X_AXIS), X_AXIS);
-  return mol.smobbed_copy ();
-}
-  
-void
-Hyphen_spanner::set_textitem (Direction d, Grob* b)
-{
-  elt_->set_bound (d, b);
-  elt_->add_dependency (b);
-}
 
-Hyphen_spanner::Hyphen_spanner (Spanner*s)
-{
-  elt_ = s;
+  total.translate_axis ( -sp->relative_coordinate (common, X_AXIS), X_AXIS);
+  return total.smobbed_copy ();
 }
 
 
 
 ADD_INTERFACE (Hyphen_spanner, "lyric-hyphen-interface",
 	       "A centred hyphen is a simple line between lyrics used to divide syllables",
-	       "thickness height minimum-length maximum-length word-space");
+	       "thickness height dash-period length");
 
diff --git a/lily/include/beam.hh b/lily/include/beam.hh
index a9e04426a9..72728d799f 100644
--- a/lily/include/beam.hh
+++ b/lily/include/beam.hh
@@ -73,7 +73,6 @@ private:
 };
 
 const int REGION_SIZE = 2;
-#define DEBUG_QUANTING 0
 
 
 #endif /* BEAM_HH */
diff --git a/lily/include/hyphen-spanner.hh b/lily/include/hyphen-spanner.hh
index 68c3e16360..a06ac82f43 100644
--- a/lily/include/hyphen-spanner.hh
+++ b/lily/include/hyphen-spanner.hh
@@ -12,10 +12,7 @@
 struct Hyphen_spanner 
 {
 public:
-  Spanner* elt_;
-
   DECLARE_SCHEME_CALLBACK(set_spacing_rods, (SCM));
-  Hyphen_spanner (Spanner*);
   void set_textitem (Direction, Grob*);
   bool has_interface (Grob*);
   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh
index 565b907ada..5c237fb162 100644
--- a/lily/include/lookup.hh
+++ b/lily/include/lookup.hh
@@ -19,17 +19,17 @@
 struct Lookup
 {
   static Molecule dot (Offset p, Real radius);
-  static Molecule bracket (Axis a, Interval iv, Real thick, Real protude);
+  static Molecule bracket (Axis a, Interval iv, Real thick, Real protude, Real blot);
   static Molecule accordion (SCM arg, Real interline_f, Font_metric*fm);
   static Molecule round_filled_polygon (Array<Offset> points, Real blotdiameter);
-  static Molecule frame (Box b, Real thick);
+  static Molecule frame (Box b, Real thick, Real blot);
   static Molecule slur (Bezier controls, Real cthick, Real thick);
   static Molecule bezier_sandwich (Bezier top_curve, Bezier bottom_curve);
   static Molecule horizontal_slope (Real width, Real slope, Real height);
   static Molecule beam (Real slope, Real width, Real thick);
   static Molecule dashed_slur (Bezier, Real thick, Real dash);
   static Molecule blank (Box b);
-  static Molecule filledbox (Box b);
+  static Molecule filled_box (Box b);
   static Molecule round_filled_box (Box b, Real blotdiameter);
   static Molecule repeat_slash (Real w, Real slope, Real th);
   static Molecule line (Real th, Offset from, Offset to);
diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh
index ad898a679f..b449dc5c7b 100644
--- a/lily/include/paper-def.hh
+++ b/lily/include/paper-def.hh
@@ -59,7 +59,6 @@ public:
     JUNKME
    */
   Real get_realvar (SCM symbol) const;
-  Real get_var (String id) const;
   void reinit ();
   Paper_def ();
   Paper_def (Paper_def const&);
diff --git a/lily/include/separation-item.hh b/lily/include/separation-item.hh
index 99f0bbe7a2..2beaedd56a 100644
--- a/lily/include/separation-item.hh
+++ b/lily/include/separation-item.hh
@@ -11,13 +11,14 @@
 #define SINGLE_MALT_GROUPING_ITEM_HH
 
 #include "lily-proto.hh"
+#include "direction.hh"
 
 struct Separation_item
 {
   static bool has_interface (Grob*);
   static Interval conditional_width (Grob*,Grob*) ;
   static Interval width (Grob*) ;
-
+  static Grob*extremal_break_aligned_grob (Grob*,Direction, Interval*);
   static void add_item (Grob*,Item*);
   static void add_conditional_item (Grob*,Grob*);  
 };
diff --git a/lily/include/staff-spacing.hh b/lily/include/staff-spacing.hh
index 8359dcd53c..a7ef8bf723 100644
--- a/lily/include/staff-spacing.hh
+++ b/lily/include/staff-spacing.hh
@@ -21,7 +21,6 @@ public:
   static void get_spacing_params (Grob*,Real*,Real*);
 
   static Interval bar_y_positions (Grob*);
-  static  Grob*  extremal_break_aligned_grob (Grob*,Direction, Interval*);
 };
 
 #endif /* STAFF_SPACING_HH */
diff --git a/lily/lookup.cc b/lily/lookup.cc
index 9781002205..caa1996ed4 100644
--- a/lily/lookup.cc
+++ b/lily/lookup.cc
@@ -154,7 +154,7 @@ Lookup::blank (Box b)
 }
 
 Molecule
-Lookup::filledbox (Box b) 
+Lookup::filled_box (Box b) 
 {
   SCM  at  = (scm_list_n (ly_symbol2scm ("filledbox"),
 		     gh_double2scm (-b[X_AXIS][LEFT]),
@@ -353,8 +353,14 @@ Lookup::round_filled_polygon (Array<Offset> points, Real blotdiameter)
   return polygon;
 }
 
+
+/*
+  TODO: deprecate?
+
+  should use rounded corners.
+ */
 Molecule
-Lookup::frame (Box b, Real thick)
+Lookup::frame (Box b, Real thick, Real blot)
 {
   Molecule m;
   Direction d = LEFT;
@@ -368,12 +374,11 @@ Lookup::frame (Box b, Real thick)
 	  edges[o][DOWN] = b[o][DOWN] - thick/2;
 	  edges[o][UP] = b[o][UP] + thick/2;	  
 	  
-	  m.add_molecule (filledbox (edges));
+	  m.add_molecule (round_filled_box (edges, blot));
 	}
       while (flip (&d) != LEFT);
     }
   return m;
-  
 }
 
 /*
@@ -723,23 +728,24 @@ Lookup::repeat_slash (Real w, Real s, Real t)
   return Molecule (b, slashnodot); //  http://slashnodot.org
 }
 
+
 Molecule
-Lookup::bracket (Axis a, Interval iv, Real thick, Real protude)
+Lookup::bracket (Axis a, Interval iv, Real thick, Real protude, Real blot)
 {
   Box b;
   Axis other = Axis((a+1)%2);
   b[a] = iv;
   b[other] = Interval(-1, 1) * thick * 0.5;
   
-  Molecule m =  filledbox (b);
+  Molecule m =  round_filled_box (b, blot);
 
   b[a] = Interval (iv[UP] - thick, iv[UP]);
   Interval oi = Interval (-thick/2, thick/2 + fabs (protude)) ;
   oi *=  sign (protude);
   b[other] = oi;
-  m.add_molecule (filledbox (b));
+  m.add_molecule (round_filled_box (b, blot));
   b[a] = Interval (iv[DOWN], iv[DOWN]  +thick);
-  m.add_molecule (filledbox(b));
+  m.add_molecule (round_filled_box (b,blot));
 
   return m;
 }
@@ -778,7 +784,8 @@ LY_DEFINE(ly_bracket ,"ly:bracket",
 
   return Lookup::bracket ((Axis)gh_scm2int (a), ly_scm2interval (iv),
 			  gh_scm2double (t),
-			  gh_scm2double (p)).smobbed_copy ();
+			  gh_scm2double (p),
+			  gh_scm2double (t)).smobbed_copy ();
 }
 
 
diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc
index 01c3fda293..9471946c10 100644
--- a/lily/lyric-extender.cc
+++ b/lily/lyric-extender.cc
@@ -42,7 +42,8 @@ Lyric_extender::brew_molecule (SCM smob)
 
   Real h = sl * gh_scm2double (me->get_grob_property ("thickness"));
   
-  Molecule  mol (Lookup::filledbox (Box (Interval (0,w), Interval (0,h))));
+  Molecule  mol (Lookup::round_filled_box (Box (Interval (0,w), Interval (0,h)),
+					   0.8 * h));
   mol.translate_axis (left_point - me->relative_coordinate (common, X_AXIS), X_AXIS);
   return mol.smobbed_copy ();
 }
diff --git a/lily/measure-grouping-spanner.cc b/lily/measure-grouping-spanner.cc
index 7c42896fe5..df06b7f30a 100644
--- a/lily/measure-grouping-spanner.cc
+++ b/lily/measure-grouping-spanner.cc
@@ -42,7 +42,7 @@ Measure_grouping::brew_molecule (SCM grob)
   Molecule m; 
   if (which == ly_symbol2scm ("bracket"))
     {
-      m = Lookup::bracket (X_AXIS, iv, t,-gh_scm2double (height));
+      m = Lookup::bracket (X_AXIS, iv, t,-gh_scm2double (height), t);
     }
   else if (which == ly_symbol2scm ("triangle"))
     {
diff --git a/lily/mensural-ligature.cc b/lily/mensural-ligature.cc
index 77e4881622..e978d4b518 100644
--- a/lily/mensural-ligature.cc
+++ b/lily/mensural-ligature.cc
@@ -57,7 +57,7 @@ brew_flexa (Grob *me,
 	-0.5*height - cauda_box_y.length();
 
       Box cauda_box (cauda_box_x, cauda_box_y);
-      Molecule cauda = Lookup::filledbox (cauda_box);
+      Molecule cauda = Lookup::filled_box (cauda_box);
       cauda.translate_axis (y_correction, Y_AXIS);
       molecule.add_molecule (cauda);
     }
diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc
index 1fb8e620ca..8824ab3596 100644
--- a/lily/multi-measure-rest.cc
+++ b/lily/multi-measure-rest.cc
@@ -171,23 +171,26 @@ Multi_measure_rest::symbol_molecule (Grob *me, Real space)
 }
 
 
-
+/*
+  WIDTH can also be 0 to determine the minimum size of the object.
+ */
 Molecule
 Multi_measure_rest::big_rest (Grob *me, Real width)
 {
-  Real tthick = gh_scm2double (me->get_grob_property ("thick-thickness"));
+  Real thick_thick = gh_scm2double (me->get_grob_property ("thick-thickness"));
   Real hair_thick = gh_scm2double (me->get_grob_property ("hair-thickness"));
 
 
   Real ss = Staff_symbol_referencer::staff_space (me);
-  
   Real slt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
-  Real y = slt * tthick/2 * ss;
+  Real y = slt * thick_thick/2 * ss;
   Real ythick = hair_thick * slt * ss;
-  Box b(Interval (0, width - 2 * ythick), Interval (-y, y));
+  Box b(Interval (0,  0 >? (width - 2 * ythick)), Interval (-y, y));
+  
+  Real blot = width ? (.8 * (y <? ythick)) : 0.0;
   
-  Molecule m =  Lookup::filledbox (b);
-  Molecule yb = Lookup::filledbox (Box (Interval (-0.5, 0.5)* ythick, Interval (-ss, ss)));
+  Molecule m =  Lookup::round_filled_box (b, blot);
+  Molecule yb = Lookup::round_filled_box (Box (Interval (-0.5, 0.5)* ythick, Interval (-ss, ss)), blot);
 
   m.add_at_edge (X_AXIS, RIGHT, yb, 0, 0);
   m.add_at_edge (X_AXIS, LEFT, yb, 0, 0);
diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc
index 9964632f30..38c8438872 100644
--- a/lily/note-spacing.cc
+++ b/lily/note-spacing.cc
@@ -269,7 +269,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
 		      it = it->find_prebroken_piece (rcolumn->break_status_dir ());
 		    }
 		  
-		  Grob *last = Staff_spacing::extremal_break_aligned_grob (it, LEFT, &bar_xextent);
+		  Grob *last = Separation_item::extremal_break_aligned_grob (it, LEFT, &bar_xextent);
 
 		  if (last)
 		    bar_yextent = Staff_spacing::bar_y_positions (last);
diff --git a/lily/paper-column.cc b/lily/paper-column.cc
index 54151c63cb..58706b60e9 100644
--- a/lily/paper-column.cc
+++ b/lily/paper-column.cc
@@ -127,7 +127,7 @@ Paper_column::brew_molecule (SCM p)
   t.align_to (X_AXIS, CENTER);
   t.align_to (Y_AXIS, DOWN);
   
-  Molecule l = Lookup::filledbox (Box (Interval (-0.01, 0.01),
+  Molecule l = Lookup::filled_box (Box (Interval (-0.01, 0.01),
 				       Interval (-2, -1)));
 
   t.add_molecule (l);
diff --git a/lily/separation-item.cc b/lily/separation-item.cc
index 3a9b491789..c1822616e4 100644
--- a/lily/separation-item.cc
+++ b/lily/separation-item.cc
@@ -128,6 +128,41 @@ Separation_item::width (Grob *me)
 }
 
 
+/*
+  Try to find the break-aligned symbol in SEPARATION_ITEM that is
+  sticking out at direction D. The x size is put in LAST_EXT
+*/
+Grob*
+Separation_item::extremal_break_aligned_grob (Grob *separation_item, Direction d,
+					    Interval * last_ext)
+{
+  Grob *col = dynamic_cast<Item*> (separation_item)->get_column ();
+  last_ext->set_empty ();
+  Grob *last_grob = 0;
+  for (SCM s = separation_item->get_grob_property ("elements");
+       gh_pair_p (s); s = gh_cdr (s))
+    {
+      Grob * break_item = unsmob_grob (gh_car (s));
+      
+      if (!gh_symbol_p (break_item->get_grob_property ("break-align-symbol")))
+	continue;
+
+      Interval ext = break_item->extent (col, X_AXIS);
+
+      if (ext.is_empty ())
+	continue;
+      if (!last_grob
+	  || (last_grob && d * (ext[d]- (*last_ext)[d]) > 0) )
+	{
+	  *last_ext = ext;
+	  last_grob = break_item; 
+	}
+    }
+
+  return last_grob;  
+}
+
+
 
 
 
diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc
index 5d0213b07c..23f2bd4640 100644
--- a/lily/spacing-spanner.cc
+++ b/lily/spacing-spanner.cc
@@ -28,6 +28,13 @@
 #include "break-align-interface.hh"
 #include "spacing-interface.hh"
 
+
+/*
+  TODO: this file/class is too complex. Should figure out how to chop
+  this up even more.
+   
+ */
+
 class Spacing_spanner
 {
 public:
@@ -661,7 +668,6 @@ Spacing_spanner::standard_breakable_column_spacing (Grob * me, Item*l, Item*r,
 				   Real * fixed, Real * space,
 				   Moment shortest)
 {
- 
   *fixed = 0.0;
   Direction d = LEFT;
   Drul_array<Item*> cols(l,r);
@@ -675,10 +681,12 @@ Spacing_spanner::standard_breakable_column_spacing (Grob * me, Item*l, Item*r,
 	    what happens if we do this for non musical columns only.
 	   */
 	  Interval lext = cols[d]->extent (cols [d], X_AXIS);
-	  *fixed += -d * lext[-d];
+	  if (!lext.is_empty ())
+	    *fixed += -d * lext[-d];
 	}
     }
   while (flip (&d) != LEFT);
+  
 
   if (l->breakable_b (l) && r->breakable_b(r))
     {
@@ -694,91 +702,92 @@ Spacing_spanner::standard_breakable_column_spacing (Grob * me, Item*l, Item*r,
   else
     {
       Moment dt = Paper_column::when_mom (r) - Paper_column::when_mom (l);
-      bool dummy;
 
-      *space = *fixed + get_duration_space (me, dt, shortest.main_part_, &dummy);
+      if (dt == Moment (0,0))
+	{
+	  /*
+	    In this case, Staff_spacing should handle the job,
+	    using dt when it is 0 is silly.
+	   */
+	  *space = *fixed + 0.5; 
+	}
+      else
+	{
+	  bool dummy;
+	  *space = *fixed + get_duration_space (me, dt, shortest.main_part_, &dummy);
+	}
     }
 }
 
 
 /*
   Read hints from L and generate springs.
- */
+*/
 void
 Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shortest)
 {
-  Real max_fixed = -infinity_f;
-  Real max_space = -infinity_f;
-
-  standard_breakable_column_spacing (me, l, r, &max_fixed, &max_space ,
-				     shortest);
-  
-  for (SCM s = l->get_grob_property ("spacing-wishes");
-       gh_pair_p (s); s = gh_cdr (s))
-    {
-      Item * spacing_grob = dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
-
-      if (!spacing_grob || !Staff_spacing::has_interface (spacing_grob))
-	continue;
+  Real compound_fixed = 0.0;
+  Real compound_space = 0.0;
+  int wish_count = 0;
 
-      Real space;
-      Real fixed_space;
+  Moment dt = Paper_column::when_mom (r) - Paper_column::when_mom (l);
 
-      /*
-	column for the left one settings should be ok due automatic
-	pointer munging.
+  if (dt == Moment (0,0))
+    {
+      for (SCM s = l->get_grob_property ("spacing-wishes");
+	   gh_pair_p (s); s = gh_cdr (s))
+	{
+	  Item * spacing_grob = dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
 
-      */
-      assert (spacing_grob-> get_column () == l);
+	  if (!spacing_grob || !Staff_spacing::has_interface (spacing_grob))
+	    continue;
 
-      Staff_spacing::get_spacing_params (spacing_grob,
-					 &space, &fixed_space);
+	  Real space;
+	  Real fixed_space;
 
-      if (Paper_column::when_mom (r).grace_part_)
-	{
 	  /*
-	    Correct for grace notes.
+	    column for the left one settings should be ok due automatic
+	    pointer munging.
 
-	    Ugh. The 0.8 is arbitrary.
-	   */
-	  space *= 0.8;
-	}
-      if (space > max_space)
-	{
-	  max_space = space;
-	  max_fixed = fixed_space;
-	}
-    }
+	  */
+	  assert (spacing_grob-> get_column () == l);
 
-  
-  
-    
-  if (isinf (max_space))
-    {
-    /*
-      One situation where this can happen is when there is a column
-      that only serves as a spanning point for a short staff-symbol.
+	  Staff_spacing::get_spacing_params (spacing_grob,
+					     &space, &fixed_space);
 
-     ===============X===
+	  if (Paper_column::when_mom (r).grace_part_)
+	    {
+	      /*
+		Correct for grace notes.
 
-         |=======Y
+		Ugh. The 0.8 is arbitrary.
+	      */
+	      space *= 0.8;
+	    }
 
 
-      (here no StaffSpacing from Y to X is found.)
-    */      
-      warning ("No spacing wishes found. Does your score have a staff?");
-      max_space = 2.0;
-      max_fixed = 1.0;
+	  compound_space += space;
+	  compound_fixed += fixed_space;
+	  wish_count ++ ;
+	}
     }
 
-  
-  if (l->break_status_dir() == RIGHT
-      && Paper_column::when_mom (l) == Paper_column::when_mom (r))
+  if (compound_space <= 0.0 || !wish_count)
     {
-      /* Start of line: this space is not stretchable */
-      max_fixed = max_space;
+      standard_breakable_column_spacing (me, l, r, &compound_fixed, &compound_space ,
+					 shortest);
+      wish_count = 1;
+    }
+  else
+    {
+      compound_space /= wish_count;
+      compound_fixed /= wish_count;
     }
 
+  assert (!isinf (compound_space));
+
+
+  
   /*
     Hmm.  we do 1/0 in the next thing. Perhaps we should check if this
     works on all architectures.
@@ -791,8 +800,8 @@ Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shor
     Do it more cleanly, or rename the property. 
     
    */
-  Real strength = 1 / (max_space - max_fixed);
-  Real distance =  max_space;
+  Real strength = 1 / (compound_space - compound_fixed);
+  Real distance = compound_space;
   Spaceable_grob::add_spring (l, r, distance, strength, false);
 }
 
diff --git a/lily/staff-spacing.cc b/lily/staff-spacing.cc
index f1deb19f64..dab496820d 100644
--- a/lily/staff-spacing.cc
+++ b/lily/staff-spacing.cc
@@ -142,40 +142,6 @@ Staff_spacing::next_notes_correction (Grob *me, Grob * last_grob)
   return max_corr;
 }
 
-/*
-  Try to find the break-aligned symbol in SEPARATION_ITEM that is
-  sticking out at direction D. The x size is put in LAST_EXT
-*/
-Grob*
-Staff_spacing::extremal_break_aligned_grob (Grob *separation_item, Direction d,
-					    Interval * last_ext)
-{
-  Grob *col = dynamic_cast<Item*> (separation_item)->get_column ();
-  last_ext->set_empty ();
-  Grob *last_grob = 0;
-  for (SCM s = separation_item->get_grob_property ("elements");
-       gh_pair_p (s); s = gh_cdr (s))
-    {
-      Grob * break_item = unsmob_grob (gh_car (s));
-      
-      if (!gh_symbol_p (break_item->get_grob_property ("break-align-symbol")))
-	continue;
-
-      Interval ext = break_item->extent (col, X_AXIS);
-
-      if (ext.is_empty ())
-	continue;
-      if (!last_grob
-	  || (last_grob && d * (ext[d]- (*last_ext)[d]) > 0) )
-	{
-	  *last_ext = ext;
-	  last_grob = break_item; 
-	}
-    }
-
-  return last_grob;  
-}
-
 void
 Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
 {
@@ -202,7 +168,7 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
     }
 
   Interval last_ext;
-  Grob *last_grob = extremal_break_aligned_grob (separation_item, RIGHT,
+  Grob *last_grob = Separation_item::extremal_break_aligned_grob (separation_item, RIGHT,
 						 &last_ext);
   if (!last_grob)
     {
@@ -231,7 +197,7 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
   if (me_item->break_status_dir () == CENTER)
     {
       SCM nndef = scm_sloppy_assq (ly_symbol2scm ("next-note"), alist);
-      if (gh_pair_p (nndef ))
+      if (gh_pair_p (nndef))
 	space_def = nndef;
     }
   
@@ -247,11 +213,30 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
   SCM type = gh_car (space_def) ;
 
   *fixed = last_ext[RIGHT];
-  if (type == ly_symbol2scm ("extra-space"))
-    *space = *fixed + distance;
+  if (type == ly_symbol2scm ("fixed-space"))
+    {
+     *fixed += distance;
+     *space = *fixed;
+    }
+  else if (type == ly_symbol2scm ("extra-space")) 
+    {
+      *space = *fixed + distance;
+    }
+  else if (type == ly_symbol2scm ("semi-fixed-space"))
+    {
+      *fixed += distance / 2; 
+      *space =  *fixed + distance/2;
+    }
   else if (type == ly_symbol2scm("minimum-space"))
-    *space = last_ext[LEFT] + (last_ext.length () >? distance);
-
+    {
+      *space = last_ext[LEFT] + (last_ext.length () >? distance);
+    }
+  else if (type == ly_symbol2scm("minimum-fixed-space"))
+    {
+      *space = last_ext[LEFT] + (last_ext.length () >? distance);
+      *fixed = *space;
+    }
+  
   *space += next_notes_correction (me, last_grob);
 }
 
diff --git a/lily/stanza-number-engraver.cc b/lily/stanza-number-engraver.cc
index 6d76b38041..1977462635 100644
--- a/lily/stanza-number-engraver.cc
+++ b/lily/stanza-number-engraver.cc
@@ -60,7 +60,7 @@ void
 Stanza_number_engraver::acknowledge_grob (Grob_info inf)
 {
   if (text_
-      && inf.grob_->internal_has_interface (ly_symbol2scm ("lyric-text-interface")))
+      && inf.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface")))
     {
       Side_position_interface::add_support (text_, inf.grob_);
     }
diff --git a/lily/stem.cc b/lily/stem.cc
index 9899a99fca..ce26886866 100644
--- a/lily/stem.cc
+++ b/lily/stem.cc
@@ -944,7 +944,7 @@ Stem::calc_stem_info (Grob *me)
     /* stem only extends to center of beam */
     - 0.5 * beam_thickness;
 
- Real minimum_y = note_start + minimum_length;
+  Real minimum_y = note_start + minimum_length;
   
   
   ideal_y *= my_dir;
diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc
index 35bb3aeeeb..0714d819e7 100644
--- a/lily/system-start-delimiter.cc
+++ b/lily/system-start-delimiter.cc
@@ -62,9 +62,10 @@ Will not fix it since I'm not sure.
 Molecule
 System_start_delimiter::simple_bar (Grob*me,Real h) 
 {
-  Real w = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) *
-    gh_scm2double (me->get_grob_property ("thickness"));
-  return Lookup::filledbox (Box (Interval (0,w), Interval (-h/2, h/2)));
+  Real lt =me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) ;
+  Real w = lt * gh_scm2double (me->get_grob_property ("thickness"));
+  return Lookup::round_filled_box (Box (Interval (0,w), Interval (-h/2, h/2)),
+				   lt);
 }
 
 MAKE_SCHEME_CALLBACK (System_start_delimiter,after_line_breaking,1);
diff --git a/lily/vaticana-ligature.cc b/lily/vaticana-ligature.cc
index d712bfcd86..e97a7f0f08 100644
--- a/lily/vaticana-ligature.cc
+++ b/lily/vaticana-ligature.cc
@@ -168,12 +168,12 @@ vaticana_brew_flexa (Grob *me,
        */
       Box left_edge_box (Interval (0, line_thickness),
 			 Interval (-0.5*left_height, +0.5*left_height));
-      Molecule left_edge = Lookup::filledbox (left_edge_box);
+      Molecule left_edge = Lookup::filled_box (left_edge_box);
       molecule.add_molecule(left_edge);
 
       Box right_edge_box (Interval (-line_thickness, 0),
 			  Interval (-0.5*right_height, +0.5*right_height));
-      Molecule right_edge = Lookup::filledbox (right_edge_box);
+      Molecule right_edge = Lookup::filled_box (right_edge_box);
       right_edge.translate_axis (width, X_AXIS);
       right_edge.translate_axis (corrected_interval / 2.0, Y_AXIS);
       molecule.add_molecule(right_edge);
diff --git a/mf/feta-eindelijk.mf b/mf/feta-eindelijk.mf
index d05c97a749..29f381484b 100644
--- a/mf/feta-eindelijk.mf
+++ b/mf/feta-eindelijk.mf
@@ -191,7 +191,7 @@ enddef;
 save bulb_diam, thin, thick;
 
 bulb_diam# := 0.64 staff_space#;
-thin# := 1.2 stafflinethickness#;
+thin# := 1.4 stafflinethickness# - 0.02 staff_space#;
 thick# :=  2.2 stafflinethickness#;
 crook_thin := 0.5 stafflinethickness  + 0.08 staff_space;
 
@@ -199,6 +199,10 @@ lower_brush := 1.5 stafflinethickness;
 
 define_pixels ( bulb_diam, thin, thick);
 
+%
+% PAT is a compact way to pass the brush shape to the routine.
+%
+
 def draw_rest_bulb(expr ycenter, ycut, pat, stretch) =
 begingroup;
 	save x,y,pt;
@@ -264,7 +268,7 @@ def draw_eighth_rest =
 	fill pat;
 	
 
-	draw_rest_bulb(0.5 staff_space , y2r , pat , 1.0);
+	draw_rest_bulb (0.5 staff_space , y2r , pat , 1.0);
 	penlabels (1, 2);
 	labels(9);
 
diff --git a/mf/feta-test-generic.mf b/mf/feta-test-generic.mf
index 702e0e63be..72bbee2700 100644
--- a/mf/feta-test-generic.mf
+++ b/mf/feta-test-generic.mf
@@ -7,12 +7,12 @@
 %input feta-bolletjes;	
 %input feta-banier;
 %input feta-slag;
-%input feta-eindelijk;
+input feta-eindelijk;
 %input feta-klef;
 %	input feta-toevallig;
 %	input feta-schrift;
 %	input feta-haak;
 %	input feta-timesig;
 %	input feta-pendaal;
-	input feta-accordion;
+%	input feta-accordion;
 %	input feta-solfa;
diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm
index 2ee3ec233a..8643310e07 100644
--- a/scm/define-grob-properties.scm
+++ b/scm/define-grob-properties.scm
@@ -300,7 +300,6 @@ use @code{\outputproperty}. @code{\property .. \override} will not
 work: @code{\override} is processed after the StaffSymbol is created,
 and will have no effect.
 ")
-(grob-property-description 'maximum-length ly:dimension? "don't make Grob longer than this")
 (grob-property-description 'maximum-rest-count integer? "kill off rests so we don't more than this number left.")
 (grob-property-description 'measure-length ly:moment? "Length of a
 measure. Used in some spacing situations.")
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index 3cf74b20b1..2392ee9ee3 100644
--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -46,7 +46,7 @@
 		       (key-signature . (extra-space . 0.0))
 		       (staff-bar . (extra-space . 0.0))
 		       (time-signature . (extra-space . 0.0)) 
-		       (first-note . (extra-space . 0.0))
+		       (first-note . (fixed-space . 0.0))
 		       ))
        (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface break-aligned-interface item-interface  font-interface))))
        ))
@@ -78,7 +78,8 @@
 			(custos . (minimum-space . 2.0))
 			(clef .   (minimum-space . 1.0))
 			(key-signature . (extra-space . 1.0))
-			(first-note . (extra-space . 1.3))
+			(first-note . (fixed-space . 1.3))
+			(next-note . (semi-fixed-space . 1.3))
 			(right-edge . (extra-space . 0.0))
 			))
 
@@ -176,7 +177,7 @@
 	(auto-knee-gap . 5.5)
 
 	;; only for debugging.
-;	(font-name . "cmr10")
+	(font-name . "cmr10")
 	
 	(space-function . ,Beam::space_function)
 	(meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
@@ -209,7 +210,7 @@
 			(key-signature . (minimum-space . 1.5))
 			(staff-bar . (minimum-space . 1.5))
 			(clef . (minimum-space . 2.0))
-			(first-note . (minimum-space . 1.0))
+			(first-note . (fixed-space . 1.0)) ;huh? 
 			(right-edge . (extra-space . 0.1))
 			))
 	(molecule-callback . ,Text_item::brew_molecule)
@@ -231,7 +232,7 @@
 			(staff-bar . (extra-space . 0.7))
 			(key-signature . (minimum-space . 4.0))
 			(time-signature . (minimum-space . 4.2))
-			(first-note . (minimum-space . 5.0))
+			(first-note . (minimum-fixed-space . 5.0))
 			(next-note . (extra-space . 0.5))
 			(right-edge . (extra-space . 0.5))
 			))
@@ -277,7 +278,7 @@
 	(adjust-if-on-staffline . #t)
 	(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
 	(space-alist . (
-			(first-note . (minimum-space . 0.0))
+			(first-note . (minimum-fixed-space . 0.0))
 			(right-edge . (extra-space . 0.1))
 			))
 	(meta . ((interfaces
@@ -358,7 +359,7 @@
 			(staff-bar . (extra-space . 0.0))
 			(breathing-sign . (minimum-space  . 0.0))
 			(clef . (extra-space . 0.85))
-			(first-note . (extra-space . 1.0))
+			(first-note . (fixed-space . 1.0))
 			(right-edge . (extra-space . 0.0))
 			(key-signature . (extra-space . 0.0))
 			))
@@ -442,7 +443,7 @@
 			(time-signature . (extra-space . 1.25))
 			(staff-bar .  (extra-space . 1.1))
 			(right-edge . (extra-space . 0.5))
-			(first-note . (extra-space . 2.5))
+			(first-note . (fixed-space . 2.5))
 			))
 	(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
 	(break-align-symbol . key-signature)
@@ -469,10 +470,11 @@
     (LyricHyphen
      . (
 	(thickness . 1.0)
-	(height . 0.4)
+	(height . 0.42)
+	(dash-period . 10.0)
+	(length . 0.66)
 	(minimum-length .  0.5) 
 	(maximum-length .  100)
-	(spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
 	(molecule-callback . ,Hyphen_spanner::brew_molecule)
 	(Y-extent-callback . ,Grob::point_dimension_callback)
 	(meta . ((interfaces . (lyric-hyphen-interface spanner-interface))))
@@ -847,7 +849,7 @@
      . ((molecule-callback . ,Text_item::brew_molecule)		
 	(font-family . roman)
 	(font-series . bold)
-	(padding . 1.5)
+	(padding . 1.0)
 	(X-offset-callbacks . (,Side_position_interface::aligned_side))
 	(direction . ,LEFT) 
 	(meta . ((interfaces . (side-position-interface text-interface font-interface item-interface ))))		
@@ -924,24 +926,18 @@
 
 	;; default stem direction for note on middle line
 	(neutral-direction . -1)
-	
-	;; [Wanske]: standard length (but no shorter than minimum).
-	;; (beamed-lengths . (3.5))
-	
+
+
+
 	;; FIXME.  3.5 yields too long beams (according to Ross and
 	;; looking at Baerenreiter examples) for a number of common
 	;; boundary cases.  Subtracting half a beam thickness fixes
 	;; this, but the bug may well be somewhere else.
+
+	;; FIXME this should come from 'lengths
+
 	(beamed-lengths . (3.26 3.26 1.5))
-	
-	;; [Wanske] lists three sets of minimum lengths.  One
-	;; set for the nomal case, and one set for beams with "der
-	;; Balkenendpunkt weiter uber bzw. unter die Systemgrenze
-	;; hinaus (bei Gruppen mit grossem Tonumfang)" and the extreme
-	;; case.
-
-	;; Note that Wanske lists numbers lengths starting from top of
-	;; head, so we must add half a staff space.
+;	(beamed-lengths . (3.5 3.5 3.5 4.5 5.0))
 	
 	;; We use the normal minima as minimum for the ideal lengths,
 	;; and the extreme minima as abolute minimum length.
@@ -1135,7 +1131,7 @@
 	(break-align-symbol . time-signature)
 	(break-visibility . ,all-visible)
 	(space-alist . (
-			(first-note . (extra-space . 2.0))
+			(first-note . (fixed-space . 2.0))
 			(right-edge . (extra-space . 0.5))
 			(staff-bar .  (minimum-space . 2.0))
 			))
diff --git a/scm/new-markup.scm b/scm/new-markup.scm
index 1d4627aefd..cd23437bef 100644
--- a/scm/new-markup.scm
+++ b/scm/new-markup.scm
@@ -121,15 +121,15 @@ for the reader.
 
 
 (define-public huge-markup
-  (font-markup 'font-relative-size 2))
+  (font-markup 'font-size 2))
 (define-public large-markup
-  (font-markup 'font-relative-size 1))
+  (font-markup 'font-size 1))
 (define-public small-markup
-  (font-markup 'font-relative-size -1))
+  (font-markup 'font-size -1))
 (define-public tiny-markup
-  (font-markup 'font-relative-size -2))
+  (font-markup 'font-size -2))
 (define-public teeny-markup
-  (font-markup 'font-relative-size -3))
+  (font-markup 'font-size -3))
 (define-public dynamic-markup
   (font-markup 'font-family 'dynamic))
 (define-public italic-markup
-- 
2.39.5