[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Ragged-right alignment
From: |
Juergen Reuter |
Subject: |
Re: [PATCH] Ragged-right alignment |
Date: |
Mon, 1 Apr 2002 03:53:41 +0200 (CEST) |
On Sun, 31 Mar 2002, Han-Wen Nienhuys wrote:
> ...
> >
> > - Spaceable_grob::add_spring (lc, rc, max_note_space, 1 / (max_note_space
> > -max_fixed_note_space), expand_only);
> > + bool ragged = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
> > + Real strength = (ragged) ? 1.0 : 1 / (max_note_space -
> > max_fixed_note_space);
> > + Real distance = (ragged) ? max_fixed_note_space : max_note_space;
>
> why is the ideal distance dependent on being raggedright or not? I'd like to
> use raggedright in stead of linewidth = -1 in some examples, but
> that's only useful if the spacing remains the same.
Mmh, I developed this patch originally under .48, and I had some severe
spacing problems which I tried to minimize. With the new code for grace
notes in spacing-spanner that you put into .49, these errors disappeared;
so, maybe distance can now always be set to max_note_space, but in .48,
the breaking algorithm obviously assumed tighter spacing than the grobs
(especially rests and clef changes) were finally typeset, resulting in
score lines getting too long.
>
> > + if (ragged)
> > + {
> > + // *prevent* staff symbol from being ragged right
> > + width =
> > + me->paper_l ()->get_var ("linewidth")
> > + - sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS)
> > + ;
> > + }
>
> I'd like a separate setting for this one. By default, just be as wide
> as the bounds. With a special flag, be as wide as some specified
> dimension (eg. you could add a 'width property.)
>
Sounds reasonable. I will be travelling for the next two or three days,
but after that I'll be back and have a look at it.
Thanks for putting in the patch!
Greetings,
Juergen