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 06:54:59 -0600

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

> Le mardi 14 mars 2023 à 06:15 -0600, Abraham Lee a écrit :
>
> Hi, Jean!
>
> I am aware of individuals that appreciate the ability to mix and match
> fonts, including the brace font. In fact, I would guess that the more
> common combo is to use another music font with Emmentaler braces. I do
> believe this is a corner case and maybe it should be changed with some
> logic that assumes that #:brace is supposed to match #:music, since that is
> far more common, and then when someone wants to mix and match, they have to
> do it explicitly?
>
> Do people do that because they prefer Emmmentaler's braces, or because
> their chosen font doesn't have braces?
>
> Is this specific to braces, or would there be a point in allowing to mix
> (say) clefs from one font and note heads from another?
>
> The reason for asking is that font selection and searching is pretty much
> a mess right now, and I'm trying to understand what its ideal state would
> be before trying to overhaul it.
>

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.

For what it's worth,
Abraham


reply via email to

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