]> git.donarmstrong.com Git - lilypond.git/blob - input/test/font-table.ly
* input/test/font-table.ly: use it.
[lilypond.git] / input / test / font-table.ly
1
2
3 \paper {
4   %% ugh. text on toplevel is a bit broken... .
5   
6   oddHeaderMarkup = \markup {}
7   evenHeaderMarkup = \markup {}
8   oddFooterMarkup = \markup {}
9   evenFooterMarkup = \markup {}
10   }
11
12 #(define (doc-char name)
13   (make-line-markup
14    (list
15     (make-pad-to-box-markup
16      '(0 . 30)
17      '(-2 . 2)
18      (make-typewriter-markup (make-small-markup name)))
19     (make-pad-to-box-markup
20      '(-2 . 2)
21      '(-2 . 2)
22      (make-musicglyph-markup name)))))
23
24 #(define (min-length lst n)
25   "(min  (length lst) n)"
26   
27   (if (or (null? lst) (<= n 0))
28    0
29    (1+ (min-length (cdr lst) (1- n)) )))
30
31 #(define (doc-chars names acc)
32   (let*
33    ((n (min-length names 2))
34     (head (take names n))
35     (tail (drop names n))
36     )
37
38    (if (null? head)
39     acc
40     (doc-chars  tail
41      (cons (make-line-markup (map doc-char head)) acc)))
42      ))
43
44 #(define (group-lines lines)
45   (let*
46    ((n (min-length lines 25))
47     (head (take lines n))
48     (tail (drop lines n))
49     )
50
51    (cons
52     (make-column-markup head)
53     (if (null? tail)
54      '()
55      (group-lines tail)))))
56                         
57 #(let*
58   ((lines (doc-chars
59            (ly:otf-glyph-list (ly:font-load "emmentaler-20"))
60          '()))
61    (pages (group-lines (reverse lines))))
62
63   (for-each 
64    (lambda (x)
65     (collect-scores-for-book parser
66      (make-override-markup '(word-space . 8) x)))
67                         pages))
68
69