From fb7064c634d127e372af021b8eac8a46767fcc41 Mon Sep 17 00:00:00 2001 From: hanwen Date: Thu, 2 Jun 2005 11:35:53 +0000 Subject: [PATCH] (acknowledge_grob): only center on parent if we have a notehead. Fixes incorrect offsets when Paper_column is very wide in the X direction. --- ChangeLog | 4 ++++ lily/dynamic-engraver.cc | 9 ++++++++- scm/define-grobs.scm | 3 +-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae61a5a822..3261d19731 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-06-02 Han-Wen Nienhuys + * lily/dynamic-engraver.cc (acknowledge_grob): only center on + parent if we have a notehead. Fixes incorrect offsets when + Paper_column is very wide in the X direction. + * input/regression/font-family-override.ly (Module): new file. * scm/font.scm (make-pango-font-tree): new function. diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 5e1cbc9754..ab120ab46d 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -19,6 +19,7 @@ #include "side-position-interface.hh" #include "staff-symbol-referencer.hh" #include "warn.hh" +#include "self-alignment-interface.hh" /* TODO: @@ -270,6 +271,7 @@ Dynamic_engraver::stop_translation_timestep () finished_line_spanner_ = line_spanner_; line_spanner_ = 0; } + typeset_all (); if (cresc_ && !cresc_->get_bound (LEFT)) @@ -382,7 +384,12 @@ Dynamic_engraver::acknowledge_grob (Grob_info info) { SCM head = scm_last_pair (info.grob ()->get_property ("note-heads")); if (scm_is_pair (head)) - script_->set_parent (unsmob_grob (scm_car (head)), X_AXIS); + { + script_->set_parent (unsmob_grob (scm_car (head)), X_AXIS); + script_->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, + X_AXIS); + + } } if (cresc_) diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index fc5be554fe..eee6d11c2e 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -384,8 +384,7 @@ . ( (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) (print-function . ,Text_interface::print) - (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self - ,Self_alignment_interface::centered_on_parent)) + (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) (self-alignment-X . 0) (no-spacing-rods . #t) (script-priority . 100) -- 2.39.5