]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/clef-engraver.cc
Allows optional octavation for clefs
[lilypond.git] / lily / clef-engraver.cc
index 00c345771728f4e46a06ed75ce08c023b0740f1c..1471c481b2d0805b1958b45be89d15a7954f07d7 100644 (file)
@@ -119,9 +119,12 @@ Clef_engraver::create_clef ()
           SCM txt = scm_number_to_string (scm_from_int (abs_oct),
                                           scm_from_int (10));
 
-          g->set_property ("text",
-                           scm_list_n (ly_lily_module_constant ("vcenter-markup"),
-                                       txt, SCM_UNDEFINED));
+          SCM style = get_property ("clefOctavationStyle");
+
+          SCM formatter = get_property ("clefOctavationFormatter");
+          if (ly_is_procedure (formatter))
+            g->set_property ("text", scm_call_2 (formatter, txt, style));
+
           Side_position_interface::add_support (g, clef_);
 
           g->set_parent (clef_, Y_AXIS);
@@ -212,6 +215,7 @@ ADD_TRANSLATOR (Clef_engraver,
                 /* read */
                 "clefGlyph "
                 "clefOctavation "
+                "clefOctavationStyle "
                 "clefPosition "
                 "explicitClefVisibility "
                 "forceClef ",