X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fdots.cc;h=afa82868a83f95afb6a4b8fc86462593f93ab087;hb=a491ce3b527c6baa8a261147d8684ca82c61e903;hp=d19f353a3b38e8ac5b4e43fff7f882869385f08b;hpb=545092a25d8ca41dc90b87482474b3719f7130a9;p=lilypond.git diff --git a/lily/dots.cc b/lily/dots.cc index d19f353a3b..afa82868a8 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2005 Han-Wen Nienhuys + (c) 1997--2006 Han-Wen Nienhuys */ #include "dots.hh" @@ -14,6 +14,7 @@ #include "lookup.hh" #include "staff-symbol-referencer.hh" #include "directional-element-interface.hh" +#include "international.hh" MAKE_SCHEME_CALLBACK (Dots, print, 1); SCM @@ -26,7 +27,17 @@ Dots::print (SCM d) if (scm_is_number (c)) { - Stencil d = Font_interface::get_default_font (sc)->find_by_name (String ("dots.dot")); + SCM scm_style = sc->get_property ("style"); + string style =""; + if (scm_is_symbol (scm_style)) + style = ly_symbol2string (scm_style); + string idx = "dots.dot" + style; + Stencil d = Font_interface::get_default_font (sc)->find_by_name (idx); + if (d.is_empty ()) + { + sc->warning (_f ("dot `%s' not found", idx.c_str ())); + return SCM_EOL; + } Real dw = d.extent (X_AXIS).length (); /* @@ -48,12 +59,13 @@ Dots::print (SCM d) return mol.smobbed_copy (); } -ADD_INTERFACE (Dots, "dots-interface", +ADD_INTERFACE (Dots, "The dots to go with a notehead or rest." "@code{direction} sets the preferred direction to move in case of staff " "line collisions.", /* properties */ "direction " - "dot-count"); - + "dot-count " + "style " + );