Jump to content

Changing stanza fonts: Difference between revisions

From LilyPond wiki
No edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
You may have to install additional fonts.
You may have to install additional fonts.


Red Hat Fedora
Red Hat Fedora: dejavu-fonts-all


  dejavu-fonts-all
Debian GNU/Linux, Ubuntu: fonts-dejavu-core
 
                          fonts-dejavu-extra
Debian GNU/Linux, Ubuntu
 
  fonts-dejavu-core
  fonts-dejavu-extra
%}
%}


Line 33: Line 29:
</lilypond>
</lilypond>


[[Category:Really simple]]
[[Category:Vocal music]]
[[Category:Vocal music]]
[[Category:Really simple]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]][[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 05:14, 13 December 2025

Fonts can be changed independently for each stanza, including the font used for printing the stanza number.

\version "2.24"

%{
You may have to install additional fonts.

Red Hat Fedora: dejavu-fonts-all

Debian GNU/Linux, Ubuntu: fonts-dejavu-core
                          fonts-dejavu-extra
%}

\relative c'' {
  \time 3/4
  g2 e4
  a2 f4
  g2.
}
\addlyrics {
  \set stanza = #"1. "
  Hi, my name is Bert.
}
\addlyrics {
  \override StanzaNumber.font-name = #"DejaVu Sans"
  \set stanza = #"2. "
  \override LyricText.font-family = #'typewriter
  Oh, ché -- ri, je t'aime
}