From c19dc0b2d549724254967d8acdd3740c4400c71f Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 29 Nov 2000 18:52:09 +0100 Subject: [PATCH] patch::: 1.3.112.jcn4 --- VERSION | 2 +- input/test/follow-thread.ly | 20 +++++++----- input/test/metronome.ly | 19 +++++++++--- lily/note-head-line-engraver.cc | 54 ++++++++++++++++++++------------- mf/feta-banier.mf | 4 +-- 5 files changed, 63 insertions(+), 36 deletions(-) diff --git a/VERSION b/VERSION index c9d4f024df..6aff731d9e 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=112 -MY_PATCH_LEVEL=jcn3 +MY_PATCH_LEVEL=jcn4 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/follow-thread.ly b/input/test/follow-thread.ly index d0df4d3873..d22f1fcf9b 100644 --- a/input/test/follow-thread.ly +++ b/input/test/follow-thread.ly @@ -4,21 +4,25 @@ \context PianoStaff < \context Staff=one \notes\relative c''{ \context Thread - a +%{ + d, \translator Staff=two - a, + c -% smaller = easier to debug. -%{ a + b \translator Staff=one - a'' + a' %} - s2 + [c,8 + \translator Staff=two + c] + s2. + } - \context Staff=two { \clef bass; \skip 1; } + \context Staff=two { \clef bass; \skip 1*2; } > \paper{ - linewidth = 70.\mm; + linewidth = 90.\mm; \translator { \ScoreContext followThread = ##t diff --git a/input/test/metronome.ly b/input/test/metronome.ly index 197f5adc33..431799d719 100644 --- a/input/test/metronome.ly +++ b/input/test/metronome.ly @@ -1,14 +1,25 @@ \version "1.3.110"; +% Test scm markup text and kerning + +% Warning +% +% This is not a feature, it is a hack. If you change anything, +% it will probably break (that's because scm markup text is a +% bit broken and needs fixing). Chances are, it's already +% broken by the time you read this. Don't complain. % -% Test new font selection and scm text markup -% +% FIXME: put in an item, and typeset by an engraver. + +#(define note '(rows (music "noteheads-2" ((kern . -0.1) "flags-stem")))) +#(define eight-note `(rows ,note ((kern . -0.1) (music ((raise . 3.5) "flags-u3"))))) +#(define dotted-eight-note `(rows ,eight-note (music "dots-dot"))) + \score{ \notes\relative c''{ - % put me in an engraver - a1-#'(rows (music "noteheads-2" ((kern . -0.1) "flags-stem") ((kern . -0.1) ((raise . 3.5) "flags-u3"))) " = 64") + a1-#`(rows ,dotted-eight-note " = 64") } \paper{ linewidth = -1.\mm; diff --git a/lily/note-head-line-engraver.cc b/lily/note-head-line-engraver.cc index cd45b77323..9ca614859b 100644 --- a/lily/note-head-line-engraver.cc +++ b/lily/note-head-line-engraver.cc @@ -11,6 +11,7 @@ #include "item.hh" #include "musical-request.hh" #include "spanner.hh" +#include "stem.hh" #include "rhythmic-head.hh" #include "side-position-interface.hh" #include "staff-symbol-referencer.hh" @@ -89,34 +90,45 @@ Note_head_line_engraver::acknowledge_grob (Grob_info info) } } +static Grob* +beam_l (Grob *h) +{ + if (Grob *s = Rhythmic_head::stem_l (h)) + return Stem::beam_l (s); + return 0; +} + void Note_head_line_engraver::create_grobs () { if (!line_ && (follow_ || last_req_) && last_head_ && head_ && (last_head_ != head_)) { - /* type Glissando? */ - if (follow_) - line_ = new Spanner (get_property ("FollowThread")); - else - line_ = new Spanner (get_property ("Glissando")); - - line_->set_bound (LEFT, last_head_); - line_->set_bound (RIGHT, head_); + /* Don't follow if there's a beam. - /* - Note, mustn't set y-parent of breakable symbol to simple item: - one of the two broken parts won't have an y-parent! - - line_->set_parent (head_, Y_AXIS); - line_->set_parent (last_head_, Y_AXIS); - - */ - /* X parent is set by set_bound */ - line_->set_parent (Staff_symbol_referencer::staff_symbol_l (last_head_), - Y_AXIS); - - announce_grob (line_, last_req_); + Hmm, this doesn't work, as head_ does not yet have a beam. + Should probably store follow_ in line_, and suicide at some + later point */ + if (!(follow_ + && beam_l (last_head_) && beam_l (last_head_) == beam_l (head_))) + { + if (follow_) + line_ = new Spanner (get_property ("FollowThread")); + else + line_ = new Spanner (get_property ("Glissando")); + + line_->set_bound (LEFT, last_head_); + line_->set_bound (RIGHT, head_); + + /* Note, mustn't set y-parent of breakable symbol to simple item: + one of the two broken parts won't have an y-parent! */ + /* X parent is set by set_bound */ + line_->set_parent (Staff_symbol_referencer::staff_symbol_l (last_head_), + Y_AXIS); + + announce_grob (line_, last_req_); + } + last_req_ = 0; follow_ = false; last_head_ = 0; diff --git a/mf/feta-banier.mf b/mf/feta-banier.mf index c384f98fc6..8f68b5f5cf 100644 --- a/mf/feta-banier.mf +++ b/mf/feta-banier.mf @@ -436,14 +436,14 @@ fet_endchar; fet_beginchar("stem (up)", "stem", "stem") set_char_box(stemthickness#/2, 0, 3.5staff_space#, stemthickness#/2); pickup pencircle scaled stemthickness; - draw (0, 0) .. (0, 3.5staff_space); + draw (0, 0.2staff_space) .. (0, 3.5staff_space); fet_endchar; % do we want this? fet_beginchar("stem (down)", "dstem", "dstem") set_char_box(stemthickness#/2, -3.5staff_space#, 0, stemthickness#/2); pickup pencircle scaled stemthickness; - draw (0, 0) .. (-3.5staff_space, 0); + draw (0, -0.2staff_space) .. (-3.5staff_space, 0); fet_endchar; -- 2.39.5