Aaron,

I noticed that the scaling factor -- #3 in the example below -- is not the
same between this method and the standard method ( \override Chordname
#'font-size).
This isn't a problem, as I was able to adjust the font size to my liking,
however I am curious as to why the difference exists.

%%%
\version "2.19"

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)))))
   } #} )

Chords = \chordmode {
  \override ChordName #'font-name = #"Source Sans Pro"
  a:dim bes c:maj7 d:m e:aug fis g:7/b
}

<<
  \new ChordNames
    \with \embiggenChordNames #3
    \Chords
>>

<<
  \new ChordNames
    \with { \override ChordName #'font-size = #3 }
    \Chords
>>
%%%

On Tue, May 14, 2019 at 9:23 PM Gregory Hollands <
gregory.j.holla...@gmail.com> wrote:

> Aaron,
>
> This function is working nicely, except the major seventh triangle is
> still growing with the font size.
> I *was* able to put this in an included .ily file. I had been including
> the wrong file before  ¯\_(ツ)_/¯
>
> %%%
> \version "2.19"
>
> 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)))))
>    } #} )
>
> Chords = \chordmode {
>   \override ChordName #'font-name = #"Source Sans Pro"
>   a:dim bes c:maj7 d:m e:aug fis g:7/b
> }
>
> <<
>   \new ChordNames \with \embiggenChordNames #3 { \Chords }
> >>
> %%%
>
> Thanks for helping me out,
> Greg
>
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to