X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmulti-measure-rest.cc;h=38dd598ee95d329be323342eeddb4da4817b946b;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=7f2a720d6f809e06736272397e703d577d70f827;hpb=0c14539bc83d6bb405141b6f21430b33d1e8fcf0;p=lilypond.git diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 7f2a720d6f..38dd598ee9 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -317,19 +317,30 @@ Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measure_cou symbol_count++; } - /* Make outer padding this much bigger. */ + /* + When symbols spread to fullest extent, outer padding is this much + bigger. + */ Real outer_padding_factor = 1.5; + /* Widest gap between symbols; to be limited by max-symbol-separation */ Real inner_padding = (space - symbols_width) / (2 * outer_padding_factor + (symbol_count - 1)); if (inner_padding < 0) inner_padding = 1.0; + Real max_separation = max (robust_scm2double (me->get_property ("max-symbol-separation"), 8.0), + 1.0); + + inner_padding = min (inner_padding, max_separation); + Real left_offset = (space - symbols_width - (inner_padding * (symbol_count - 1))) + / 2; + Stencil mol; for (SCM s = mols; scm_is_pair (s); s = scm_cdr (s)) mol.add_at_edge (X_AXIS, LEFT, *unsmob (scm_car (s)), inner_padding); mol.align_to (X_AXIS, LEFT); - mol.translate_axis (outer_padding_factor * inner_padding, X_AXIS); + mol.translate_axis (left_offset, X_AXIS); return mol; } @@ -432,6 +443,7 @@ ADD_INTERFACE (Multi_measure_rest, "bound-padding " "expand-limit " "hair-thickness " + "max-symbol-separation " "measure-count " "minimum-length " "round-up-exceptions "