On Thu, Mar 21, 2013 at 1:21 PM, Janek Warchoł
<janek.lilyp...@gmail.com> wrote:
On Thu, Mar 21, 2013 at 9:14 AM, <d...@gnu.org> wrote:
I don't know the logic of the code and its uses, so this is basically
my
unqualified gut feeling and nothing else. [...]
It is telling that (presumably after looking at the code at least
once) you don't know what the logic of the code is. [...]
I'll write some more complete explanation and send it to the list.
It took a lot of time and became much longer than i expected, but
eventually i've written a detailed explanation of how alignment in
Lilypond works - this should "put [this] function into perspective":
http://lists.gnu.org/archive/html/lilypond-user/2013-03/msg00956.html
If i got everything right, you'll see in that explanation that an empty
extent isn't harmful (at least in self-alignment) - it just results in
offset being 0.
So, the question is: in general, is it ok if a grob has empty extent?
Or should extent always be some Interval (possibly zero)?
In other words: if an alignment method is called on an empty grob (see
example below), should it just say "well, i received an empty object, so
what? I can't do anything with it, so i'll move on", or shout "hey,
there are empty grobs flying around! Do something about it!".
Example: if we override grob's stencil to #f, the extent will be #f as
well:
\version "2.17.12"
{ c' e' f' d' }
\addlyrics { la le \override LyricText #'stencil = ##f li lo }
- the above code reports "programming error: cannot align on self: empty
element". Do we consider above code (and the use of \omit as currently
defined) a good practice? Or do we want users to write
\version "2.17.12"
{ c' e' f' d' }
\addlyrics {
la le
\override LyricText #'stencil = ##f
\override LyricText #'X-extent = #'(0 . 0)
li lo
}
Bottom line: this patch is about consistency. If we care about grobs
having non-empty extents, we should report programming errors in all
self-alignment methods. If we don't care, we should not report any
programming errors about this.
I hope this makes this issue clear. I'd really like to move forward
with this.
best,
Janek
https://codereview.appspot.com/7533046/
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel