LEFT | RIGHT |
1 #(set-global-staff-size 16) | 1 #(set-global-staff-size 16) |
2 | 2 |
3 #(begin | 3 #(begin |
4 | 4 |
5 ;; some helper functions | 5 ;; some helper functions |
6 | 6 |
7 (use-modules (ice-9 regex)) | 7 (use-modules (ice-9 regex)) |
8 | 8 |
9 (define glyph-list | 9 (define glyph-list |
10 (delete ".notdef" | 10 (delete ".notdef" |
11 (ly:otf-glyph-list (ly:system-font-load "emmentaler-20")))) | 11 (ly:otf-glyph-list (ly:system-font-load "emmentaler-20")))) |
12 | 12 |
13 (define (get-group glyph-list regexp) | 13 (define (get-group glyph-list regexp) |
14 (let ((r (make-regexp regexp))) | 14 (let ((r (make-regexp regexp))) |
15 (filter (lambda (token) (regexp-exec r token)) | 15 (filter (lambda (token) (regexp-exec r token)) |
16 glyph-list))) | 16 glyph-list))) |
17 | 17 |
18 ;;;;;;;;; | 18 ;;;;;;;;; |
19 | 19 |
20 ;; extract ancient-music groups before extracting default | 20 ;; extract ancient-music groups before extracting default |
21 ;; accidentals, rests, etc. to prevent duplication | 21 ;; accidentals, rests, etc. to prevent duplication |
22 | 22 |
23 ;; make sure "mensural" regexp doesn't match "neomensural" | 23 ;; make sure "mensural" regexp doesn't match "neomensural" |
24 (define neomensural (get-group glyph-list "^.*neomensural.*$")) | 24 (define neomensural (get-group glyph-list "^.*neomensural.*$")) |
25 (define mensural | 25 (define mensural |
26 (filter (lambda (x) (not (member x neomensural))) | 26 (filter (lambda (x) (not (member x neomensural))) |
27 (get-group glyph-list "^.*mensural.*$"))) | 27 (get-group glyph-list "^.*mensural.*$"))) |
28 (define kievan (get-group glyph-list "^.*kievan.*$")) | |
29 | 28 |
30 ;; get the rest of the ancient-music groups | 29 ;; get the rest of the ancient-music groups |
31 (define vaticana (get-group glyph-list "^.*vaticana.*$")) | 30 (define vaticana (get-group glyph-list "^.*vaticana.*$")) |
32 (define medicaea (get-group glyph-list "^.*medicaea.*$")) | 31 (define medicaea (get-group glyph-list "^.*medicaea.*$")) |
33 (define hufnagel (get-group glyph-list "^.*hufnagel.*$")) | 32 (define hufnagel (get-group glyph-list "^.*hufnagel.*$")) |
34 (define petrucci (get-group glyph-list "^.*petrucci.*$")) | 33 (define petrucci (get-group glyph-list "^.*petrucci.*$")) |
35 (define solesmes (get-group glyph-list "^.*solesmes.*$")) | 34 (define solesmes (get-group glyph-list "^.*solesmes.*$")) |
| 35 (define kievan (get-group glyph-list "^.*kievan.*$")) |
36 | 36 |
37 ;; remove ancient-music groups from the glyph-list | 37 ;; remove ancient-music groups from the glyph-list |
38 (for-each | 38 (for-each |
39 (lambda (x) (set! glyph-list (delete x glyph-list))) | 39 (lambda (x) (set! glyph-list (delete x glyph-list))) |
40 (append vaticana | 40 (append vaticana |
41 medicaea | 41 medicaea |
42 hufnagel | 42 hufnagel |
43 mensural | 43 mensural |
44 neomensural | 44 neomensural |
45 petrucci | 45 petrucci |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 (define (doc-chars-aux names acc) | 158 (define (doc-chars-aux names acc) |
159 (let* ((n (min-length names 2)) | 159 (let* ((n (min-length names 2)) |
160 (head (take names n)) | 160 (head (take names n)) |
161 (tail (drop names n))) | 161 (tail (drop names n))) |
162 (if (null? head) | 162 (if (null? head) |
163 (reverse! acc) | 163 (reverse! acc) |
164 (doc-chars-aux tail | 164 (doc-chars-aux tail |
165 (cons (make-line-markup (map make-doc-char-markup head)
) | 165 (cons (make-line-markup (map make-doc-char-markup head)
) |
166 acc))))) | 166 acc))))) |
167 (interpret-markup-list layout props (doc-chars-aux names (list)))) | 167 (interpret-markup-list layout props (doc-chars-aux names (list)))) |
LEFT | RIGHT |