]> git.donarmstrong.com Git - lilypond.git/blob - input/test/font-table.ly
Fix some bugs in the dynamic engraver and PostScript backend
[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 \version "2.7.39"
13
14 #(define (doc-char name)
15   (make-line-markup
16    (list
17     (make-pad-to-box-markup
18      '(0 . 30)
19      '(-2 . 2)
20      (make-typewriter-markup (make-small-markup name)))
21     (make-pad-to-box-markup
22      '(-2 . 2)
23      '(-2 . 2)
24      (make-musicglyph-markup name)))))
25
26 #(define (min-length lst n)
27   "(min  (length lst) n)"
28   
29   (if (or (null? lst) (<= n 0))
30    0
31    (1+ (min-length (cdr lst) (1- n)) )))
32
33 #(define (doc-chars names acc)
34   (let*
35    ((n (min-length names 2))
36     (head (take names n))
37     (tail (drop names n))
38     )
39
40    (if (null? head)
41     acc
42     (doc-chars  tail
43      (cons (make-line-markup (map doc-char head)) acc)))
44      ))
45
46 #(define (group-lines lines)
47   (let*
48    ((n (min-length lines 25))
49     (head (take lines n))
50     (tail (drop lines n))
51     )
52
53    (cons
54     (make-column-markup head)
55     (if (null? tail)
56      '()
57      (group-lines tail)))))
58                         
59 #(let*
60   ((lines (doc-chars
61            (ly:otf-glyph-list (ly:font-load "emmentaler-20"))
62          '()))
63    (pages (group-lines (reverse lines))))
64
65   (for-each 
66    (lambda (x)
67     (collect-scores-for-book parser
68      (make-override-markup '(word-space . 8) x)))
69                         pages))
70
71