lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fetaBraces


From: Abraham Lee
Subject: Re: fetaBraces
Date: Tue, 14 Mar 2023 12:10:01 -0600

On Tue, Mar 14, 2023 at 10:55 AM Jean Abou Samra <jean@abou-samra.fr> wrote:

> Le mardi 14 mars 2023 à 06:54 -0600, Abraham Lee a écrit :
>
> I hear you there. Any custom music font I'm aware of has a matching brace
> font. So, my guess is that they are choosing Emmentaler deliberately,
> though I suppose it's possible that someone just might not be aware that
> they need to select the brace font explicitly.
>
> It's not difficult to mix and match fonts for groups of symbols (like
> clefs or noteheads) within the same document, though, I'd expect the number
> of users doing this to be far fewer than those using a single custom font
> for everything. The mechanism isn't that obvious to someone who hasn't
> dabbled in some Scheme.
>
> For example, if one wanted to register multiple fonts, here's what I've
> done that worked very well for me when I was wildly into it (don't shame
> me, I'm no Scheme expert lol):
>
> %<----------------------------------------------------
>
> #(define-public (add-notation-font fontnode name music-str brace-str
> factor)
>   (begin
>     (add-music-fonts fontnode
>       name music-str brace-str
>       feta-design-size-mapping factor)
>     fontnode))
>
> \paper {
>   #(define notation-fonts
>     (list
>       (list 'capriccio "capriccio" "emmentaler")
>       (list 'emmentaler "emmentaler" "emmentaler")
>       (list 'gonville "gonville" "gonville")
>       (list 'lilyjazz "lilyjazz" "lilyjazz")
>       (list 'mtf-arnold "mtf-arnold" "mtf-arnold")
>       (list 'mtf-beethoven "mtf-beethoven" "mtf-beethoven")
>       (list 'mtf-cadence "mtf-cadence" "mtf-cadence")
>       (list 'mtf-gutenberg "mtf-gutenberg1939" "mtf-gutenberg1939")
>       (list 'mtf-haydn "mtf-haydn" "mtf-haydn")
>       (list 'mtf-improviso "mtf-improviso" "mtf-improviso")
>       (list 'mtf-ross "mtf-ross" "mtf-ross")
>       (list 'mtf-scorlatti "mtf-scorlatti" "mtf-scorlatti")
>     ))
>
>   #(begin
>     (for-each
>       (lambda (tup)
>         (add-notation-font fonts
>           (car tup) ; font identifier
>           (cadr tup) ; notation font
>           (caddr tup) ; brace font
>           (/ staff-height pt 20)))
>       notation-fonts))
> }
>
> %<----------------------------------------------------
>
> Then, whenever the user wanted to change the font of a specific grob (like
> Notehead), then all they'd need to do is use (for example)
>
> \override Notehead.font-family = #'gonville
>
> which, of course, can be done at the Score level or spontaneously
> mid-Score.
>
> Well, the way I currently envision the new font system, it would break
> that Scheme code, but also make it trivial to achieve the same thing
> without Scheme code.
>
> Unifying feta and fetaBraces would therefore still allow selecting a
> different music font for your SystemStartBraces. What it would not directly
> allow is *also* changing the font that is used for \markup \left-brace
> and \markup \right-brace. Probably not a big problem.
>
> I'm not yet 100% sure that it will actually simplify things to unify feta
> and fetaBraces, but if it does, I think I'll submit it.
>

Probably not a big deal either way since most users *aren't* using custom
fonts anyway, and I almost always only use a single music font for
everything (no mixing like in the method I proposed above). However, for
those that are using a custom font (like me), as long as the new mechanism
is easy to follow, I can't say I am against whatever changes you are
proposing. Thanks for all your excellent work!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]