]> git.donarmstrong.com Git - lilypond.git/blob - input/test/time-signature-double.ly
* mf/parmesan-clefs.mf: use # quantities for char_box
[lilypond.git] / input / test / time-signature-double.ly
1
2 \version "1.9.4"
3
4 \header { texidoc= "@cindex Time Signature Double
5 Double time signatures are not supported
6 explicitly, but can be faked by overriding formatting routines. "
7 }
8
9
10 #(define (brew-double-time-sig grob)
11   (define (frac-to-mol font frac)
12     (let*
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       (ly:molecule-align-to! c Y CENTER)
17       c
18     ))
19   
20   (let*
21       
22     ((chain (Font_interface::get_property_alist_chain grob))
23      (font (ly:paper-get-font (ly:grob-get-paper grob) chain))
24      (f1 '(6 . 4))
25      (musfont (ly:paper-get-font (ly:grob-get-paper grob) (cons (list '(font-relative-size . 2) '(font-family . music)) chain)))
26      (plus (ly:molecule-translate-axis (ly:find-glyph-by-name musfont "scripts-stopped") 0.1 Y))
27      (f2 '(3 . 2))
28      (m1 (frac-to-mol font f1))
29      (m2 (frac-to-mol font f2)) )
30      
31     
32     (ly:molecule-combine-at-edge
33      (ly:molecule-combine-at-edge m1 X RIGHT plus 0.2)
34      X RIGHT m2  0.2)
35     
36     )
37 )
38
39
40 \score  { \notes \relative c'
41           {
42            \property Staff.TimeSignature \override #'molecule-callback = #brew-double-time-sig
43            \time 3/2
44            c2 c c 
45            
46    }
47         \paper{ raggedright = ##t}
48 }