On 2019-05-12 5:29 pm, Gregory Hollands wrote:
I want to use an alternative font for ChordNames, but the font I have
chosen is not exactly the same size as the default font. The result is
that
musical symbols (sharps, flat, etc) appear too large.
How can I change the size of the musical symbols in ChordNames so that
they
match the size of the font?
Here is a bit of a hack:
%%%%
\version "2.19.82"
embiggenChordNames = #(define-scheme-function (size) (number?)
#{ \with {
chordNameFunction = #(lambda (in-pitches bass inversion context)
(define (helper mu)
(if (list? mu)
(if (eq? (car mu) musicglyph-markup)
(markup (#:fontsize (- size) mu))
(map helper mu))
mu))
(let ((orig (ignatzek-chord-names in-pitches bass inversion
context)))
(markup (#:fontsize size (helper orig)))))
} #} )
theChords = \chordmode { c2:7 g2:dim aes2:m fis2 }
<< \new ChordNames \theChords
\new ChordNames \with \embiggenChordNames #5 \theChords
\new ChordNames \with \embiggenChordNames #-3 \theChords >>
%%%%
This applies a global \fontsize to the markup to scale everything up by
a specified amount; however, it also looks within the markup for
occurrences of \musicglyph and applies an inverse \fontsize so they
remain the original size.
Wouldn't be surprised to learn there is some built-in procedure like
map-some-music but for markup that would obsolete my helper function
above. But I threw this together pretty quickly.
-- Aaron Hill
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user