CueVoice Font

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CueVoice Font

SoundsFromSound

Hi all,

Is there a "better" way to change the CueVoice font family / kerning other than manually via markup? I thought it would be a sort of:

\context {
    \CueVoice
     \override .......
  }

...but I haven't found a way to adjust the kerning and/or font family. Have I missed something?

I don't use a lot of cues, but in an upcoming project there will be a lot more so I was curious moving forward.

Thanks for any guidance on this!

I've attached an image showing the "fl" looking a bit squished to my eyes. :)

=== this is what I've been using for a while now, which works just fine manually ===

{
  c4 r4 r2 \compressFullBarRests R1*12

  \new CueVoice {c8^\markup { \override #'(font-name . "Minion Pro") "fl." }[ d e g]  }
  f2
}

etc.



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

cuevoice.png (25K) Download Attachment
composer | sound designer | asmr artist
Reply | Threaded
Open this post in threaded view
|

Re: CueVoice Font

Aaron Hill
On 2019-02-20 3:32 pm, Ben wrote:
> I've attached an image showing the "fl" looking a bit squished to my
> eyes. :)

"fl" (fl) is a ligature in many fonts.  Therefore, what you are seeing as
tighter kerning is most likely a single glyph representing both
characters.

You could try something like \concat { "f" \hspace #0 "l" } which should
typeset an "f" and an "l" without the ligature, using the normal kerning
for the individual letters.  The \hspace is needed otherwise LilyPond
would combine the strings causing the ligature to still occur.

-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: CueVoice Font

SoundsFromSound
On 2/20/2019 7:18 PM, Aaron Hill wrote:
On 2019-02-20 3:32 pm, Ben wrote:
I've attached an image showing the "fl" looking a bit squished to my eyes. :)

"fl" (fl) is a ligature in many fonts.  Therefore, what you are seeing as tighter kerning is most likely a single glyph representing both characters.

You could try something like \concat { "f" \hspace #0 "l" } which should typeset an "f" and an "l" without the ligature, using the normal kerning for the individual letters.  The \hspace is needed otherwise LilyPond would combine the strings causing the ligature to still occur.

-- Aaron Hill



Aaron,

I didn't know that about ligatures, thanks! Now it makes more sense.

Do you know if it's possible to make a 'global' CueVoice font change via \context, or do I need to continue doing it manually / setup a variable, but still outside a \context?

i.e. \markup { \override #'(font-name . "Minion Pro")


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
composer | sound designer | asmr artist
Reply | Threaded
Open this post in threaded view
|

Re: CueVoice Font

Aaron Hill
On 2019-02-20 5:52 pm, Ben wrote:
> I didn't know that about ligatures, thanks! Now it makes more sense.
>
> Do you know if it's possible to make a 'global' CueVoice font change
> via \context, or do I need to continue doing it manually / setup a
> variable, but still outside a \context?
>
> i.e. \markup *{ \override #'(font-name . "Minion Pro")*

Yes, but it is a little trickier than you would imagine.  Consider:

%%%%
\version "2.19.82"
\layout { \context { \CueVoice \override TextScript.font-name =
#"Roboto" } }
\new Staff {
   \new Voice { a'4^"a" b'^\markup \bold "b" }
   \new CueVoice { c''4^"c" d''^\markup \bold "d" }
}
%%%%

This changes the font-name for TextScripts that appear in a CueVoice.  
Notice that the TextScripts in the Voice are unaffected.  But also note
that the \bold markup command did not work for "d".  This is because
font-name takes precedence over font-family.  Please review a post [1] I
made a month back.

[1]:
https://lists.gnu.org/archive/html/lilypond-user/2019-01/msg00723.html

We can do better by overriding font-family, not font-name.  Consider:

%%%%
\version "2.19.82"
\paper { #(define fonts (set-global-fonts #:sans "Roboto")) }
\layout { \context { \CueVoice \override TextScript.font-family = #'sans
} }
\new Staff {
   \new Voice { a'4^"a" b'^\markup \bold "b" }
   \new CueVoice { c''4^"c" d''^\markup \bold "d" }
}
%%%%

Here we have redefined the "sans" font-family to be "Roboto" and then
instructed all TextScripts within CueVoices to use that family.  This
affects the change we want and still allows \bold and \italic to work.  
And again, the TextScripts in the Voice are not changed.

It should be noted that defining fonts within the \paper block is
generally the right way to set fonts in a score, so you should consider
that option first.  But for one-off font changes, a simple font-name
override should be fine.

The post I mentioned above [1] also includes an example of defining your
own custom font-family, which can be helpful if you need more than one
"roman" or "sans" font.  It should be easy enough to define a "romanII",
for instance.


-- Aaron Hill

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user