1 #(set-global-staff-size
16)
4 %% ugh. text on toplevel is a bit broken...
6 oddHeaderMarkup
= \markup {}
7 evenHeaderMarkup
= \markup {}
8 oddFooterMarkup
= \markup {}
9 evenFooterMarkup
= \markup {}
14 #(define-markup-command
(doc-char layout props name
) (string?
)
15 (interpret-markup layout props
16 (let
* ((n
(string-length name
)))
18 ;; split long glyph names near the middle at dots
19 (let
* ((middle-pos
(round
(/ n
2)))
20 (left-dot-pos
(string-rindex name
#\
. 0 middle-pos
))
21 (right-dot-pos
(string-index name
#\
. middle-pos
))
22 (left-distance
(if
(number? left-dot-pos
)
23 (- middle-pos left-dot-pos
)
25 (right-distance
(if
(number? right-dot-pos
)
26 (- right-dot-pos middle-pos
)
28 (split-pos
(if
(> left-distance right-distance
)
31 (left
(substring name
0 split-pos
))
32 (right
(substring name split-pos
)))
34 #:pad-to-box
'(0 . 36) '(-
2 . 2) #:column
(#:typewriter left
35 #:typewriter
#:concat
(" " right
))
36 #:pad-to-box
'(-
2 . 4) '(-
3.5 . 3.5) #:huge
#:musicglyph name
))
38 #:pad-to-box
'(0 . 36) '(-
2 . 2) #:typewriter name
39 #:pad-to-box
'(-
2 . 4) '(-
3.5 . 3.5) #:huge
#:musicglyph name
)))))
41 #(define-markup-list-command
(doc-chars layout props names
) (list?
)
42 (define
(min-length lst n
)
43 "(min (length lst) n)"
44 (if
(or
(null? lst
) (<= n
0))
46 (1+
(min-length
(cdr lst
) (1- n
)))))
47 (define
(doc-chars-aux names acc
)
48 (let
* ((n
(min-length names
2))
50 (tail
(drop names n
)))
54 (cons
(make-line-markup
(map make-doc-char-markup head
))
56 (interpret-markup-list layout props
(doc-chars-aux names
(list
))))
58 \markuplines \override-lines
#'(word-space
. 4)
59 \doc-chars
#(delete
".notdef"
60 (ly
:otf-glyph-list
(ly
:font-load
"emmentaler-20")))