Consider accidentals in optical spacing correction.
[lilypond.git] / input / regression / apply-output.ly
blobd107e4a42f3263d895d7c798929280efdcfd00b3
1 \version "2.12.0"
3 \header {
4 texidoc = "The @code{\applyOutput} expression is the most flexible way to
5 tune properties for individual grobs.
7 Here, the layout of a note head is changed depending on its vertical
8 position.
12 #(define (mc-squared gr org cur)
13 (let*
15 (ifs (ly:grob-interfaces gr))
16 (sp (ly:grob-property gr 'staff-position))
18 (if (memq 'note-head-interface ifs)
19 (begin
20 (ly:grob-set-property! gr 'stencil
21 (grob-interpret-markup gr
22 (make-raise-markup -0.5
23 (case sp
24 ((-5) (make-simple-markup "m"))
25 ((-3) (make-simple-markup "c "))
26 ((-2) (make-smaller-markup (make-bold-markup "2")))
27 (else (make-simple-markup "bla"))
28 ))))
29 ))))
31 \new Voice \relative c' {
32 \set autoBeaming = ##f
34 <d f g b>8
36 \applyOutput #'Voice #mc-squared
37 <d f g b>8