>> Attached. In the end the necessary modifications were surprisingly >> minor. Please comment, there is certainly room for improvements. > > Thanks. This is a bit what I feared: in this state, there is > potential for things going wrong with other after-line-breaking > callbacks. Those are the kind of thing that can be buggy in obscure > circumstances. I'm a little nervous on having my "off-the-top" / > "first thing that seemed to work" solution in the code base :-)
I think your code is very clear and easy to understand. My extensions aren't complicated either. It also works nicely and flawless in combination with the new `VaticanaLyrics` context. So please be more specific about your fears. You told us that you are working on the breaking algorithm since a few months, so I guess you are the best person to voice objections and give counterexamples. Kieren, can you test this, too? We should probably continue the discussion on lilypond-devel, since it seems to get bloody technical. :-) > OTOH, it's *probably* not too difficult to refactor this to use a > separate 'original-text property and a 'text property computed by a > callback, with X-offset computed only after-line-breaking, X-extent > left empty and springs-and-rods doing the magic that would otherwise > be done by Separation_item::set_distance, at the condition of > letting Grob::extent skip the X-offset calculation in case the > extent is found to be empty (which could be a good idea regardless > actually). This is way too complicated for me, sorry. > Or something like that. Too bad that we don't have pure widths (we > could if I finally managed to finish a big patch that has been > pending for about a year), but it should be possible to do without I > think. I think. Well, I fear I can't help you with the coding if you think this is the best route to go. But as usual: The better is the enemy of the good :-) > But right now, I'm a bit swamped due to a somewhat important exam > next Thursday. I wish you success! > If you guys are ready to clean up this thing, that would be a relief > for me given the amount of other contributions that I am trying to > get around to. Define 'clean up'. AFAICS, what you have outlined above is not a cleanup but a complete reimplementation based on a different algorithm... Werner