]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/markup-arrows.ly: new file.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 3 Aug 2005 18:23:47 +0000 (18:23 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 3 Aug 2005 18:23:47 +0000 (18:23 +0000)
* lily/tuplet-bracket.cc: document new behavior.

* input/regression/tuplet-broken.ly: new file. Demonstrate tuplets
with line breaks.

* scm/define-markup-commands.scm (arrow-head): arrow-head markup command.

* scm/define-grobs.scm (all-grob-descriptions): set arrows as
default

* lily/tuplet-bracket.cc: add edge-text property.
add break-overshoot.
(print): read break-overshoot.
(print): read edge-text, add stencils.

* mf/feta-arrow.mf: new file.

* mf/feta-generic.mf: add feta-arrow.

22 files changed:
ChangeLog
Documentation/topdocs/NEWS.tely
flower/include/interval.hh
input/regression/markup-arrows.ly [new file with mode: 0644]
input/regression/tuplet-broken.ly [new file with mode: 0644]
lily/book.cc
lily/dynamic-text-spanner.cc
lily/include/text-interface.hh
lily/mark-engraver.cc
lily/ottava-bracket.cc
lily/paper-book.cc
lily/parser.yy
lily/part-combine-engraver.cc
lily/text-interface.cc
lily/text-spanner.cc
lily/tuplet-bracket.cc
mf/feta-arrow.mf [new file with mode: 0644]
mf/feta-generic.mf
mf/feta-test-generic.mf
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/define-markup-commands.scm

index ae71dcec5b692604e2dec7c64396a2f0e37b573a..ea86c198a48cffe6573de835e5cde0374e205d37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2005-08-03  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * input/regression/markup-arrows.ly:  new file.
+
+       * lily/tuplet-bracket.cc: document new behavior.
+
+       * input/regression/tuplet-broken.ly: new file. Demonstrate tuplets
+       with line breaks.
+
+       * scm/define-markup-commands.scm (arrow-head): arrow-head markup command.
+
+       * scm/define-grobs.scm (all-grob-descriptions): set arrows as
+       default 
+
+       * lily/tuplet-bracket.cc: add edge-text property.
+       add break-overshoot.
+       (print): read break-overshoot.
+       (print): read edge-text, add stencils.
+
+       * mf/feta-arrow.mf: new file.
+
+       * mf/feta-generic.mf: add feta-arrow.
+
 2005-08-03  Mats Bengtsson  <mabe@drongo.s3.kth.se>
 
        * Documentation/user/lilypond-book.itely (An example of a
index fa47c14a5731bb9ae82fcd49db5c57c3da7a45e4..42ec9c6735d0602512690704981c4a134fb3352c 100644 (file)
@@ -33,6 +33,33 @@ See user manual, \NAME\
 
 @itemize @bullet
 
+@item
+Tuplet brackets get arrows when they are broken across a line.
+
+@lilypond[fragment,raggedright,verbatim,relative=2]
+\times 4/5 {
+ c c c \bar "empty" \break c c
+}
+@end lilypond
+
+This feature was sponsored by Trevor Baca.
+
+
+@item
+Arrow heads were added to the Feta font.
+
+@lilypond[]
+\lyrics {
+  \markup {
+    filled, to the right:  \hspace #2.0 \fontsize #6 \arrow-head #0 #1 ##t
+    open, down: \hspace #2.0 \fontsize #6 \arrow-head #1 #-1 ##f
+  }
+}
+@end lilypond
+
+These glyphs have been sponsored by Trevor Baca.
+
+
 @item
 Nested tuplets are automatically positioned,
 
index c3471a576571934bb2df137a2c268d8f46f5bb18..a6a92f204de580a6be177361b240495e7eb21c52 100644 (file)
@@ -70,6 +70,11 @@ struct Interval_t : public Drul_array<T>
   {
     set_empty ();
   }
+  Interval_t (Drul_array<T> const &src)
+    : Drul_array<T> (src)
+  {
+  }
+  
   Interval_t (T m, T M) : Drul_array<T> (m, M)
   {
   }
diff --git a/input/regression/markup-arrows.ly b/input/regression/markup-arrows.ly
new file mode 100644 (file)
index 0000000..51a4c37
--- /dev/null
@@ -0,0 +1,25 @@
+
+\header {
+  texidoc = "The feta font has arrow heads"
+}
+
+
+\lyrics {
+  \markup {
+
+    filled
+    
+    \arrow-head #0 #1 ##t
+    \arrow-head #0 #-1 ##t
+    \arrow-head #1 #1 ##t
+    \arrow-head #1 #-1 ##t
+
+    
+    \arrow-head #0 #1 ##f
+    \arrow-head #0 #-1 ##f
+    \arrow-head #1 #1 ##f
+    \arrow-head #1 #-1 ##f
+  }
+}
+
+\version "2.7.4"
diff --git a/input/regression/tuplet-broken.ly b/input/regression/tuplet-broken.ly
new file mode 100644 (file)
index 0000000..43f7ca4
--- /dev/null
@@ -0,0 +1,30 @@
+
+\header
+{
+  texidoc = "Broken tuplets are adorned with little arrows."
+}
+\version "2.7.4"
+
+\paper {
+  raggedright = ##t  
+  indent = 0.0
+}
+
+
+\relative c'' {
+  \set tupletNumberFormatFunction = #fraction-tuplet-formatter
+
+  \override TupletBracket #'edge-text = #(cons
+                                         (markup #:fontsize 6
+                                            #:arrow-head 0 -1 #f)
+                                         (markup #:arrow-head 0 1 #f))
+  \times 11/19 {
+    c4 c4 c4 c4
+    \bar "empty" \break
+    c4 c4 c4 c4
+    c4 c4 c4 c4
+    \bar "empty" \break
+    c4 c4 c4 c4
+    c4 c4 c4 
+  }
+}   
index a6279b531cc1d6db66acf4e704d7f307fbb1491e..82d919f0e265f751f0c8105eb29df1995c5164ec 100644 (file)
@@ -127,7 +127,7 @@ Book::process (Output_def *default_paper,
              outputs = scm_cdr (outputs);
            }
        }
-      else if (Text_interface::markup_p (scm_car (s)))
+      else if (Text_interface::is_markup (scm_car (s)))
        paper_book->add_score (scm_car (s));
       else
        assert (0);
index 5ed1f00caeeebdedc3f771cd9897573880594079..37b701cf653d9de2c5e318d5db7394410cafc698 100644 (file)
@@ -101,8 +101,8 @@ Dynamic_text_spanner::print (SCM smob)
 
          SCM text = index_get_cell (edge_text, d);
 
-         if (Text_interface::markup_p (text))
-           edge[d] = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, text));
+         if (Text_interface::is_markup (text))
+           edge[d] = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, text));
 
          if (!edge[d].is_empty ())
            edge[d].align_to (Y_AXIS, CENTER);
index ce7d61d66d30016fe3e68db52f90cbec64f66a18..6621a4dbb299d0252a1932df47634cf61d1fa004 100644 (file)
@@ -19,7 +19,7 @@ public:
   DECLARE_SCHEME_CALLBACK (interpret_markup, (SCM, SCM, SCM));
   DECLARE_SCHEME_CALLBACK (interpret_string, (SCM, SCM, SCM));
   static bool has_interface (Grob *);
-  static bool markup_p (SCM);
+  static bool is_markup (SCM);
 };
 
 #endif /* TEXT_ITEM */
index 97b2649f50c27df524b2c7a37d91970afe9f13ba..26e9d5fbf046dedc746d8d8e5a1405d0c6d3af28 100644 (file)
@@ -101,7 +101,7 @@ Mark_engraver::process_music ()
 
       SCM m = mark_ev_->get_property ("label");
       SCM proc = get_property ("markFormatter");
-      if (!Text_interface::markup_p (m)
+      if (!Text_interface::is_markup (m)
          && ly_is_procedure (proc))
        {
          if (!scm_is_number (m))
@@ -123,7 +123,7 @@ Mark_engraver::process_music ()
            warning (_ ("rehearsalMark must have integer value"));
        }
 
-      if (Text_interface::markup_p (m))
+      if (Text_interface::is_markup (m))
        text_->set_property ("text", m);
       else
        warning (_ ("mark label must be a markup object"));
index 72f05cf59244e0b7cc90e1efd1b9d12ba4251bea..80b98d25004ec8fe8f8ebd382253c695cafa2c41 100644 (file)
@@ -69,7 +69,7 @@ Ottava_bracket::print (SCM smob)
   SCM properties = Font_interface::text_font_alist_chain (me);
   SCM markup = me->get_property ("text");
   Stencil text;
-  if (Text_interface::markup_p (markup))
+  if (Text_interface::is_markup (markup))
     text = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, markup));
 
   Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
index 79b45974648961d9b57a12900990e77aa9ebf787..dc373ea1171419663cb27e96815fafa8830ce95c 100644 (file)
@@ -307,7 +307,7 @@ Paper_book::systems ()
          system_list = scm_reverse (system_list);
          systems_ = scm_append (scm_list_2 (system_list, systems_));
        }
-      else if (Text_interface::markup_p (scm_car (s)))
+      else if (Text_interface::is_markup (scm_car (s)))
        {
          SCM t = Text_interface::interpret_markup (paper_->self_scm (),
                                                    page_properties,
index eb0dc92973cdfca60a387539bfdca3a196a8010c..85b2fb1cb70745465854507988e97fc8573a5157 100644 (file)
@@ -2698,7 +2698,7 @@ Lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
 
                *destination = p->self_scm ();
                return OUTPUT_DEF_IDENTIFIER;
-       } else if (Text_interface::markup_p (sid)) {
+       } else if (Text_interface::is_markup (sid)) {
                *destination = sid;
                if (is_lyric_state ())
                        return LYRIC_MARKUP_IDENTIFIER;
index 44e9a81a6587ed989cf7a8256b3bf026ce0a4528..eac99592e3bf0fe1c929fdfd55a4c459dbc01013 100644 (file)
@@ -59,7 +59,7 @@ Part_combine_engraver::process_music ()
       else if (what == ly_symbol2scm ("unisono"))
        text = get_property ("aDueText");
 
-      if (Text_interface::markup_p (text))
+      if (Text_interface::is_markup (text))
        {
          text_ = make_item ("CombineTextScript", event_->self_scm ());
          text_->set_property ("text", text);
index cb3484fb790f67a39d434d1feae6638c4f6a2e61..1c5cee670fad70654a61b91c63d68c87a41b44f5 100644 (file)
@@ -49,7 +49,7 @@ Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
     {
       SCM func = scm_car (markup);
       SCM args = scm_cdr (markup);
-      if (!markup_p (markup))
+      if (!is_markup (markup))
        programming_error ("markup head has no markup signature");
 
       return scm_apply_2 (func, layout_smob, props, args);
@@ -81,7 +81,7 @@ Text_interface::print (SCM grob)
 
 /* Ugh. Duplicated from Scheme.  */
 bool
-Text_interface::markup_p (SCM x)
+Text_interface::is_markup (SCM x)
 {
   return (scm_is_string (x)
          || (scm_is_pair (x)
index 207c9f2087460130c3c571d7bbcc1004d1b3bc58..52cd57f8d8c517d700745413b200e7c239e9b6e3 100644 (file)
@@ -92,7 +92,7 @@ Text_spanner::print (SCM smob)
 
          SCM text = index_get_cell (edge_text, d);
 
-         if (Text_interface::markup_p (text))
+         if (Text_interface::is_markup (text))
            edge[d] = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, text));
 
          if (!edge[d].is_empty ())
index 5b80bb3c70778d2041c27e3fc4070f83bc723694..a13a896c49a57312c9e5ceae54bd54ac18c36b67 100644 (file)
 #include "staff-symbol-referencer.hh"
 #include "lookup.hh"
 
-static Grob *
-get_x_bound_grob (Grob *g, Direction my_dir)
+static Item *
+get_x_bound_item (Grob *me_grob, Direction hdir, Direction my_dir)
 {
-  if (Note_column::get_stem (g)
+  Spanner *me = dynamic_cast<Spanner*> (me_grob);
+  Item *g = me->get_bound (hdir);
+  if (Note_column::has_interface (g)
+      && Note_column::get_stem (g)
       && Note_column::dir (g) == my_dir)
     {
       g = Note_column::get_stem (g);
     }
+  
   return g;
 }
 
@@ -162,13 +166,27 @@ Tuplet_bracket::print (SCM smob)
 
   Direction dir = get_grob_direction (me);
 
-  Grob *lgr = get_x_bound_grob (columns[0], dir);
-  Grob *rgr = get_x_bound_grob (columns.top (), dir);
+  Drul_array<Item *> bounds;
+  bounds[LEFT] = get_x_bound_item (me, LEFT, dir);
+  bounds[RIGHT] = get_x_bound_item (me, RIGHT, dir);
 
-  Real x0 = robust_relative_extent (lgr, commonx, X_AXIS)[LEFT];
-  Real x1 = robust_relative_extent (rgr, commonx, X_AXIS)[RIGHT];
-  Real w = x1 -x0;
+  Interval x_span;
+  Direction d = LEFT;
+  do
+    {
+      x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS)[d];
+
+      if (bounds[d]->break_status_dir())
+       {
+         Interval overshoot (robust_scm2drul (me->get_property ("break-overshoot"),
+                                              Interval (0,0)));
+
+         x_span[d] += d * overshoot[d];
+       }
+    }
+  while (flip (&d) != LEFT);
 
+  Real w = x_span.length();
   SCM number = me->get_property ("text");
 
   Output_def *pap = me->get_layout ();
@@ -217,7 +235,20 @@ Tuplet_bracket::print (SCM smob)
       scale_drul (&height, -ss * dir);
       scale_drul (&flare, ss);
       scale_drul (&shorten, ss);
+
       
+      do
+       {
+         if (bounds[d]->break_status_dir ())
+           {
+             height[d] = 0.0;
+             flare[d] = 0.0;
+             shorten[d] = 0.0;
+           }
+       }
+      while (flip (&d) != LEFT);
+
       Stencil brack = make_bracket (me, Y_AXIS,
                                    Offset (w, ry - ly),
                                    height,
@@ -227,11 +258,35 @@ Tuplet_bracket::print (SCM smob)
                                    */
                                    Interval (-0.5, 0.5) * gap + 0.1,
                                    flare, shorten);
+
+      do
+       {
+         if (bounds[d]->break_status_dir ())
+           {
+             SCM properties = Font_interface::text_font_alist_chain (me);
+             SCM edge_text = me->get_property ("edge-text");
+             
+             SCM text = index_get_cell (edge_text, d);
+             if (Text_interface::is_markup (text))
+               {
+                 SCM t = Text_interface::interpret_markup (pap->self_scm (), properties,
+                                                           text);
+                 
+                 Stencil *edge_text = unsmob_stencil (t);
+                 edge_text->translate_axis (x_span[d] - x_span[LEFT], X_AXIS);
+                 mol.add_stencil (*edge_text);
+               }
+           }
+       }
+      while (flip (&d) != LEFT);
+
+      
       mol.add_stencil (brack);
     }
 
   mol.translate_axis (ly, Y_AXIS);
-  mol.translate_axis (x0 - sp->get_bound (LEFT)->relative_coordinate (commonx, X_AXIS), X_AXIS);
+  mol.translate_axis (x_span[LEFT]
+                     - sp->get_bound (LEFT)->relative_coordinate (commonx, X_AXIS), X_AXIS);
   return mol.smobbed_copy ();
 }
 
@@ -376,8 +431,8 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
   if (!columns.size ())
     return;
 
-  Grob *lgr = get_x_bound_grob (columns[0], dir);
-  Grob *rgr = get_x_bound_grob (columns.top (), dir);
+  Item *lgr = get_x_bound_item (me, LEFT, dir);
+  Item *rgr = get_x_bound_item (me, RIGHT, dir);
   Real x0 = robust_relative_extent (lgr, commonx, X_AXIS)[LEFT];
   Real x1 = robust_relative_extent (rgr, commonx, X_AXIS)[RIGHT];
 
@@ -608,10 +663,14 @@ Tuplet_bracket::add_tuplet_bracket (Grob *me, Grob *bracket)
 
 ADD_INTERFACE (Tuplet_bracket,
               "tuplet-bracket-interface",
-              "A bracket with a number in the middle, used for tuplets.",
+              "A bracket with a number in the middle, used for tuplets. ",
+              "When the bracket spans  a line break, the value of "
+              "@code{break-overshoot} determines how far it extends beyond the staff. "
+              "At a line break, the markups in the @code{edge-text} are printed "
+              "at the edges. "
 
               "note-columns bracket-flare edge-height shorten-pair "
-              "tuplets "
+              "tuplets edge-text break-overshoot "
               "padding left-position right-position bracket-visibility "
               "number-visibility thickness direction");
 
diff --git a/mf/feta-arrow.mf b/mf/feta-arrow.mf
new file mode 100644 (file)
index 0000000..6a32af1
--- /dev/null
@@ -0,0 +1,139 @@
+%
+% feta-arrow.mf -- draw arrow heads
+%
+% source file of the GNU LilyPond music typesetter
+%
+% (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+%
+
+
+
+fet_begingroup ("arrowheads");
+
+
+%
+% Setup paths for upper half of arrow head pointing right. 
+% CLOSE_PATH is for a closed arrow, OPEN_PATH is for the open arrow 
+% OPEN_TENSION sets the tension for the part which forms the path in OPEN_PATH
+% 
+def set_arrow_paths (expr width, height, open_tension, arrowlinethickness) =
+       save pat, finalpath,
+               tip_angle_o, tip_angle_c, tip_dir_c, tip_dir_o,
+               indent;
+       path pat, open_path, close_path;
+       pair tip_dir_o, tip_dir_c;
+
+       pickup pencircle scaled arrowlinethickness;
+
+       indent = linethickness/2;
+
+       lft x1 = -width;
+       rt x2 = 0;
+       top y1 = height;
+       y2 = 0;
+
+       z4 = z3;
+       y5 = 0;
+       x5 = x4 + indent;
+
+       pat := z1 .. tension open_tension .. z2{right};
+
+       penpos2 (arrowlinethickness, 90);
+       tip_dir_o := direction 0.0 of pat;
+       tip_angle_o := angle (tip_dir_o);
+       penpos1 (arrowlinethickness, 90 + tip_angle_o);
+       z3 = z1;
+       penpos3 (arrowlinethickness, tip_angle_o);
+
+       open_path := z1r{tip_dir_o} .. z2r{right}
+               .. z2l{left} .. z1l{-tip_dir_o} .. z3l .. cycle;
+
+       pat := z4 .. z5{down};
+       tip_dir_c := direction 0.0 of pat;
+       tip_angle_c := angle (tip_dir_c);
+       penpos4 (arrowlinethickness, 90+ tip_angle_c);
+       penpos5 (arrowlinethickness, 0);
+       z6 = z5;
+       penpos6 (arrowlinethickness, 90);
+
+       close_path := z4l{tip_dir_c} .. z5l{down} .. z6l{right}
+               .. z2l{right} .. z2r{left}
+               .. tension open_tension 
+               .. z1r{-tip_dir_o}
+               .. z3l
+               .. cycle;
+
+enddef;
+
+fet_beginchar ("open", "open.01");
+       set_char_box (staff_space#, 0, 0.5 staff_space#, 0.5 staff_space#);
+       set_arrow_paths (staff_space, 0.5 staff_space, 1.0, 1.6 linethickness);
+       fill open_path; 
+       addto currentpicture also currentpicture yscaled -1;
+       penlabels (1, 2, 3);
+       penlabels (4, 5, 6);
+fet_endchar;
+
+fet_beginchar ("open", "open.0M1");
+       set_char_box (0, staff_space#, 0.5 staff_space#, 0.5 staff_space#);
+       set_arrow_paths (staff_space, 0.5 staff_space, 1.0, 1.6 linethickness);
+       fill open_path; 
+       addto currentpicture also currentpicture yscaled -1;
+       currentpicture := currentpicture xscaled -1;
+fet_endchar;
+
+fet_beginchar ("open", "open.11");
+       set_char_box (.5 staff_space#, .5 staff_space#,
+                       1.0 staff_space#, 0.0 staff_space#);
+       set_arrow_paths (staff_space, 0.5 staff_space, 1.0, 1.6 linethickness);
+       fill open_path; 
+       addto currentpicture also currentpicture yscaled -1;
+       currentpicture := currentpicture rotated 90;
+fet_endchar;
+
+fet_beginchar ("open", "open.1M1");
+       set_char_box (.5 staff_space#, .5 staff_space#,
+                       0.0 staff_space#, 1.0 staff_space#);
+       set_arrow_paths (staff_space, 0.5 staff_space, 1.0, 1.6 linethickness);
+       fill open_path; 
+       addto currentpicture also currentpicture yscaled -1;
+       currentpicture := currentpicture rotated 90;
+       currentpicture := currentpicture yscaled -1;
+fet_endchar;
+
+
+
+fet_beginchar ("close", "close.01");
+       set_char_box (staff_space#, 0, 0.5 staff_space#, 0.5 staff_space#);
+       set_arrow_paths (staff_space, 0.5 staff_space, 1.5, blot_diameter);
+       fill close_path;        
+       addto currentpicture also currentpicture yscaled -1;
+fet_endchar;
+fet_beginchar ("close", "close.0M1");
+       set_char_box (0, staff_space#,  0.5 staff_space#, 0.5 staff_space#);
+       set_arrow_paths (staff_space, 0.5 staff_space, 1.5, blot_diameter);
+       fill close_path;        
+       addto currentpicture also currentpicture yscaled -1;
+       currentpicture := currentpicture xscaled -1;
+fet_endchar;
+
+fet_beginchar ("close", "close.11");
+       set_char_box (.5 staff_space#, .5 staff_space# ,
+                       1.0 staff_space#, 0.0 staff_space#);
+       set_arrow_paths (staff_space, 0.5 staff_space, 1.5, blot_diameter);
+       fill close_path;        
+       addto currentpicture also currentpicture yscaled -1;
+       currentpicture := currentpicture rotated 90;
+fet_endchar;
+
+fet_beginchar ("close", "close.1M1");
+       set_char_box (.5 staff_space#, .5 staff_space# ,
+                       0.0 staff_space#, 1.0 staff_space#);
+       set_arrow_paths (staff_space, 0.5 staff_space, 1.5, blot_diameter);
+       fill close_path;        
+       addto currentpicture also currentpicture yscaled -1;
+       currentpicture := currentpicture rotated -90;
+fet_endchar;
+
+
+fet_endgroup ("arrowheads");
index 1d75e0a5c07a57469ca3acfdb712f16f8c4fd80a..dd508285aa5daf0a77cc06aca567ffddec66ca6d 100644 (file)
@@ -23,12 +23,15 @@ input feta-params;
 
 font_x_height  staff_space#;
 
+%% this is a fallback so we can run the font without including feta-bolletjes.
+black_notehead_width# := 1.0 staff_space#;
 
 
 fet_beginfont("feta", design_size, "fetaMusic");
 if test = 0: 
        input feta-eindelijk;
        input feta-toevallig;
+       input feta-arrow;
        input feta-puntje;
        input feta-bolletjes;
        input feta-schrift;
index 9af341967b9a06f6b01a551655721d556e006267..44b0168dd26ac07a39c302b41553c3a5edd8a868 100644 (file)
@@ -6,12 +6,14 @@
 %input feta-eindelijk;
 %input feta-toevallig;
 %input feta-puntje;
-input feta-bolletjes;  
+%input feta-bolletjes; 
+input feta-arrow;      
+%input feta-schrift;   
 %input feta-schrift;
 %input feta-banier;
 %      input feta-slag;
 %input feta-klef;
-input feta-haak;
+%input feta-haak;
 %      input feta-haak;
 %input feta-timesig;
 %input feta-pendaal;
index 48441d58dfd95fab9c0da7b6bdc72a4315338045..3e92408fad73387ad2c335826da486902db98502 100644 (file)
@@ -112,6 +112,8 @@ For example, clefs are put after key signatures by setting
      (break-glyph-function ,procedure? "This function determines the
 appearance of a bar line at the line break.  It takes a glyph and
 break-direction and returns the glyph at a line break.")
+     (break-overshoot ,number-pair? "How much does a broken spanner
+stick out of its bounds?")
      (breakable ,boolean? "Can this object appear at a line break,
 like clefs and bar lines?")
      (c0-position ,integer? "An integer indicating the position of
index da3cc4ff85881b3e521bdd2bb332f725780ca5ad..29e471b7ec7274b05ed012328e0984e442b34897 100644 (file)
        (padding . 1.1)
        (thickness . 1.6)
        (edge-height . (0.7 . 0.7))
+       (break-overshoot . (1.0 . 1.0)) 
        (shorten-pair . (-0.2 . -0.2))
+       (edge-text . ,(cons (markup #:arrow-head 0 -1 #f)
+                           (markup #:arrow-head 0 1 #f)))
        (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
        (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
        (print-function . ,Tuplet_bracket::print)
index 2fe8b88336098b3b93152eaf7024122d6f263c98..fb045fce3e14d3c48f8d1c9c3a67883d6c0e94a7 100644 (file)
@@ -810,11 +810,27 @@ recommend font for this is bold and italic"
                     (ly:stencil-extent stil X)
                     (ly:stencil-extent stil Y))))
 
-
+\f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; glyphs
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+
+(def-markup-command (arrow-head layout props axis direction filled)
+  (integer? ly:dir? boolean?)
+  "produce an arrow head in specified direction and axis. Use the filled head if @var{filled} is  specified."
+  (let*
+      ((name (format "arrowheads.~a.~a~a"
+                    (if filled
+                        "close"
+                        "open")
+                    axis
+                    direction)))
+    (ly:font-get-glyph
+     (ly:paper-get-font layout (cons '((font-encoding . fetaMusic))
+                                    props))
+     name)))
+
 (def-markup-command (musicglyph layout props glyph-name) (string?)
   "This is converted to a musical symbol, e.g. @code{\\musicglyph
 #\"accidentals.0\"} will select the natural sign from the music font.
@@ -869,6 +885,7 @@ letter 'A'."
    (Text_interface::interpret_markup layout props
      (number->markletter-string number->mark-alphabet-vector num)))
 
+\f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; the note command.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -957,6 +974,7 @@ a shortened down stem."
   (let ((parsed (parse-simple-duration duration)))
     (note-by-number-markup layout props (car parsed) (cadr parsed) dir)))
 
+\f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; translating.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1074,7 +1092,7 @@ that.
    (interpret-markup layout props arg)
    (* -0.5 (chain-assoc-get 'baseline-skip props))
    Y))
-
+\f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; brackets.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;