- for (vsize j = 1; j + 1 < clique.size (); j ++)
- {
- Grob *clique_col = clique[j];
-
- Paper_column *loose_col = dynamic_cast<Paper_column *> (clique[j]);
- Paper_column *next_col = dynamic_cast<Paper_column *> (clique[j + 1]);
-
- Grob *spacing = unsmob_grob (clique_col->get_object ("spacing"));
- if (Grob *grace_spacing = unsmob_grob (clique_col->get_object ("grace-spacing")))
- {
- spacing = grace_spacing;
- }
-
- Spacing_options options;
- if (spacing)
- options.init_from_grob (spacing);
- else
- programming_error ("Column without spacing object");
-
- Real base_note_space = 0.0;
-
- if (Paper_column::is_musical (next_col)
- && Paper_column::is_musical (loose_col))
- base_note_space = Spacing_spanner::note_spacing (spacing, loose_col, next_col,
- &options);
- else
- {
- Spring spring = Spacing_spanner::standard_breakable_column_spacing (spacing,
- loose_col, next_col,
- &options);
-
- base_note_space = spring.distance ();
- }
-
- base_note_space = max (base_note_space,
- robust_relative_extent (loose_col, loose_col, X_AXIS)[RIGHT]
- - robust_relative_extent (next_col, next_col, X_AXIS)[LEFT]);
-
- clique_spacing.push_back (base_note_space);
- }
-
- Real default_padding = 1.0;
- clique_spacing.push_back (default_padding);
-
+ clique_tight_spacing.push_back (0.0);
+ for (vsize j = 1; j + 1 < clique.size (); j++)
+ {
+ Grob *clique_col = clique[j];
+
+ Paper_column *loose_col = dynamic_cast<Paper_column *> (clique[j]);
+ Paper_column *next_col = dynamic_cast<Paper_column *> (clique[j + 1]);
+
+ Grob *spacing = unsmob<Grob> (clique_col->get_object ("spacing"));
+ if (Grob *grace_spacing = unsmob<Grob> (clique_col->get_object ("grace-spacing")))
+ {
+ spacing = grace_spacing;
+ }
+
+ Spacing_options options;
+ if (spacing)
+ options.init_from_grob (spacing);
+ else
+ programming_error ("Column without spacing object");
+
+ Real base_note_space = 0.0;
+ Real tight_note_space = 0.0;
+
+ if (Paper_column::is_musical (next_col)
+ && Paper_column::is_musical (loose_col))
+ {
+ Spring spring = Spacing_spanner::note_spacing (spacing, loose_col,
+ next_col, &options);
+ if (has_interface<Note_spacing> (spacing))
+ spring = Note_spacing::get_spacing (spacing, next_col,
+ spring, options.increment_);
+
+ base_note_space = spring.distance ();
+ tight_note_space = spring.min_distance ();
+ }
+ else
+ {
+ Spring spring = Spacing_spanner::standard_breakable_column_spacing (spacing,
+ loose_col, next_col,
+ &options);
+
+ base_note_space = spring.distance ();
+ tight_note_space = spring.min_distance ();
+ }
+
+ Real loose_col_horizontal_length = loose_col->extent (loose_col, X_AXIS).length ();
+ base_note_space = max (base_note_space, loose_col_horizontal_length);
+ tight_note_space = max (tight_note_space, loose_col_horizontal_length);
+
+ clique_spacing.push_back (base_note_space);
+ clique_tight_spacing.push_back (tight_note_space);
+ }
+
+ Real permissible_distance = clique.back ()->relative_coordinate (common, X_AXIS) - robust_relative_extent (clique[0], common, X_AXIS)[RIGHT];