]> git.donarmstrong.com Git - lilypond.git/blob - input/test/time-signature-double.ly
* cygwin/mknetrel: Override $(webdir) (was: $(docdir)).
[lilypond.git] / input / test / time-signature-double.ly
1 \version "1.7.18"
2
3 \header { texidoc= "@cindex Time Signature Double
4 Double time signatures are not supported
5 explicitly, but can be faked by overriding formatting routines. "
6 }
7
8
9 #(define (brew-double-time-sig grob)
10   (define (frac-to-mol font frac)
11     (let*
12         (
13          (d (fontify-text font (number->string (cdr frac))))
14          (n (fontify-text font (number->string (car frac))))
15          (c (ly:molecule-combine-at-edge d Y UP n 0.0))
16          )
17       (ly:molecule-align-to! c Y CENTER)
18       c
19     ))
20   
21   (let*
22       
23     (
24      (chain (Font_interface::get_property_alist_chain grob))
25      (font (ly:get-font grob chain))
26      (f1 '(6 . 4))
27      (musfont (ly:get-font grob (cons (list '(font-relative-size . 2) '(font-family . music)) chain)))
28      (plus (ly:molecule-translate-axis (ly:find-glyph-by-name musfont "scripts-stopped") 0.1 Y))
29      (f2 '(3 . 2))
30      (m1 (frac-to-mol font f1))
31      (m2 (frac-to-mol font f2))
32      )
33      
34     
35     (ly:molecule-combine-at-edge
36      (ly:molecule-combine-at-edge m1 X RIGHT plus 0.2)
37      X RIGHT m2  0.2)
38     
39     )
40 )
41
42
43 \score  { \notes \relative c'
44           {
45            \property Staff.TimeSignature \override #'molecule-callback = #brew-double-time-sig
46            \time 3/2
47            c2 c c 
48            
49    }
50         \paper{ raggedright = ##t}
51 }