2 (define (stack-molecules axis dir padding mols)
3 "Stack molecules MOLS in direction AXIS,DIR, using PADDING."
7 (ly-combine-molecule-at-edge (car mols) axis dir
8 (stack-molecules axis dir padding (cdr mols))
17 (define (fontify-text font-metric text)
18 "Set TEXT with font FONT-METRIC, returning a molecule."
19 (let* ((b (ly-text-dimension font-metric text)))
21 (ly-fontify-atom font-metric `(text ,text)) (car b) (cdr b))
24 (define (other-axis a)
25 (remainder (+ a 1) 2))
27 (define (bracketify-molecule mol axis thick protusion padding)
28 "Add brackets around MOL, producing a new molecule."
31 (ext (ly-get-molecule-extent mol axis))
32 (lb (ly-bracket axis ext -1 thick protusion))
33 (rb (ly-bracket axis ext 1 thick protusion))
35 (set! mol (ly-combine-molecule-at-edge mol (other-axis axis) 1 lb padding))
36 (set! mol (ly-combine-molecule-at-edge mol (other-axis axis) -1 rb padding))