]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/regression/stencil-hacking.ly
Imported Upstream version 2.14.2
[lilypond.git] / input / regression / stencil-hacking.ly
index eee9f790a8fb423a035496e1538b6c64a1d7724f..304c3461df1e7dcdcda8a7fd2bc7448263690f19 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.5.13"
+\version "2.14.0"
 
 \header { texidoc=" You can write stencil callbacks in Scheme, thus
 providing custom glyphs for notation elements.  A simple example is
@@ -18,7 +18,7 @@ Example usage:
 
   \\property NoteHead \\override #'print-function
                   =
-                     #(parenthesize-callback Note_head::print)
+                     #(parenthesize-callback ly:note-head::print)
                    
 "
 
@@ -28,7 +28,7 @@ Example usage:
 GROB.  The dimensions of the stencil is not affected.
 "
      
-     (let* ((fn (ly:get-default-font grob))
+     (let* ((fn (ly:grob-default-font grob))
            (pclose (ly:font-get-glyph fn "accidentals.rightparen"))
            (popen (ly:font-get-glyph fn "accidentals.leftparen"))
            (subject (callback grob))
@@ -37,7 +37,7 @@ GROB.  The dimensions of the stencil is not affected.
            (subject-dim-x (ly:stencil-extent subject 0))
            (subject-dim-y (ly:stencil-extent subject 1)))
 
-        ; add parens
+        ;; add parens
         (set! subject
             (ly:stencil-combine-at-edge 
              (ly:stencil-combine-at-edge subject 0 1 pclose 0.2)
@@ -49,18 +49,19 @@ GROB.  The dimensions of the stencil is not affected.
    parenthesize-stencil)
     
 
-\layout { raggedright = ##t }
+\layout { ragged-right = ##t }
 \relative c' {
     c4 e
 
-    \override NoteHead  #'print-function
+    \override NoteHead  #'stencil
     =
-    #(parenthesize-callback Note_head::print)
+    #(parenthesize-callback ly:note-head::print)
     g bes
-    \revert NoteHead #'print-function
-    \override Beam  #'print-function
+    \revert NoteHead #'stencil
+
+    \override Beam  #'stencil
     =
-    #(parenthesize-callback Beam::print)
+    #(parenthesize-callback ly:beam::print)
 
     a8 gis8 a2.