On Fri, 2008-11-28 at 01:29 +0100, Maximilian Albert wrote: > Hi, > > attached is a patch for bug #218 (see > http://code.google.com/p/lilypond/issues/detail?id=218). It simply > tests whether the directions of stem and articulation coincide, and if > so it shifts the latter sideways. Please note that the patch is just a > casual attempt to get more familiar with Lilypond's internals and that > the way it is implemented was derived mostly by trial-and-error and > sophisticated guessing. So any suggestions for improvement are most > welcome.
Hi Max, The main problem with this patch, which Neil has already mentioned, is that it comes too early in the typesetting process. The engraver step is used to set up the grobs and their relationships, but not to perform any of the actual layout (which is done mostly in the callbacks associated to grob properties). The right place to look, therefore, is at the X-offset property of the Script grob, which is set in scm/define-grobs.scm to script-interface::calc-x-offset (which lives in scm/output-lib.scm). Also a minor style point: the lilypond code convention is for a space before the opening brace of a function call. > BTW, in the bug's description it says that only staccato marks should > be centered on the stem, but I personally find it more appealing if > this applies to any kind of articulation. If you think otherwise, I'd > be happy to adapt the patch but I don't know how to test whether the > grob actually is a staccato mark or something else. I'm fine with it applying to all articulations. Joe _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel