@ref{Rehearsal marks},
@ref{Formatting text},
@ref{Music notation inside markup},
-@ref{The Feta font}.
+@ref{The Emmentaler font}.
Snippets:
@rlsr{Text}.
More generally, any available musical symbol may be included
separately in a markup object, as demonstrated below; an exhaustive
list of these symbols and their names can be found in
-@ref{The Feta font}.
+@ref{The Emmentaler font}.
@lilypond[quote,verbatim]
\relative {
@seealso
Notation Reference:
@ref{Music},
-@ref{The Feta font},
+@ref{The Emmentaler font},
@ref{Fonts explained}.
Installed Files:
using Pango.
Music notation fonts can be described as a set of specific glyphs,
-ordered in several families. The following syntax allows various
-LilyPond @code{feta} non-text fonts to be used directly in markup
-mode:
+ordered in several families. The following syntax allows LilyPond's
+various @emph{Feta} glyphs to be used directly in markup mode:
@lilypond[quote,verbatim,fragment]
a'1^\markup {
@ref{Rotating objects}.
Three families of text fonts are made available:
-@itemize
-@item
-The @emph{roman} (serif) font,
-which defaults to LilyPond Serif (an alias of TeX Gyre Schola).
-@item
-The @emph{sans} font,
-which defaults to LilyPond Sans Serif (an alias of TeX Gyre Heros).
-@item
-The @emph{typewriter} (monospaced) font,
-which defaults to LilyPond Monospace (an alias of TeX Gyre Cursor).
-@end itemize
+the @emph{roman} (serif) font,
+the @emph{sans} font, and the @emph{typewriter} font.
+
+For @code{svg} backend:
+@multitable @columnfractions .15 .30
+@headitem Family @tab Default font
+@item @emph{roman} @tab @code{serif}
+@item @emph{sans} @tab @code{sans-serif}
+@item @emph{typewriter} @tab @code{monospace}
+@end multitable
+
+@code{serif}, @code{sans-serif}, and @code{monospace} are
+@code{generic-family} in SVG and CSS specifications.
+
+For other backends:
+@multitable @columnfractions .15 .30 .55
+@headitem Family @tab Default font (alias) @tab Alias definition lists
+@item @emph{roman}
+@tab @code{LilyPond Serif}
+@tab
+TeX Gyre Schola,
+C059, Century SchoolBook URW, Century Schoolbook L,
+DejaVu Serif,
+..., serif
+@item @emph{sans}
+@tab @code{LilyPond Sans Serif}
+@tab
+TeX Gyre Heros,
+Nimbus Sans, Nimbus Sans L, DejaVu Sans,
+..., sans-serif
+@item @emph{typewriter}
+@tab @code{LilyPond Monospace}
+@tab
+TeX Gyre Cursor,
+Nimbus Mono PS, Nimbus Mono, Nimbus Mono L,
+DejaVu Sans Mono,
+..., monospace
+@end multitable
+
+@code{LilyPond Serif}, @code{LilyPond Sans Serif},
+and @code{LilyPond Monospace} are font aliases defined
+in the LilyPond dedicated FontConfig configuration file
+@code{00-lilypond-fonts.conf}.
+Where a character doesn't exist in the first font listed,
+the next font listed will be used instead for that character.
+For details of alias definitions, please see
+to @code{00-lilypond-fonts.conf} under the installed directory.
Each family may include different shapes and series. The following
example demonstrates the ability to select alternate families, shapes,
}
@end lilypond
+@noindent
+When using OpenType fonts, font features can be used.
+OpenType font scripts and languages can not be specified.
+Note: Not all OpenType fonts have all functions.
+If you request a feature that doesn't exist in the chosen font,
+then the feature is simply ignored.
+
+@lilypond[quote,verbatim]
+% True small caps
+\markup { Normal Style: Hello HELLO }
+\markup { \caps { Small Caps: Hello } }
+\markup { \override #'(font-features . ("smcp"))
+ { True Small Caps: Hello } }
+
+% Number styles
+\markup { Normal Number Style: 0123456789 }
+\markup { \override #'(font-features . ("onum"))
+ { Old Number Style: 0123456789 } }
+
+% Stylistic Alternates
+\markup { \override #'(font-features . ("salt 0"))
+ { Stylistic Alternates 0: εφπρθ } }
+\markup { \override #'(font-features . ("salt 1"))
+ { Stylistic Alternates 1: εφπρθ } }
+
+% Multiple features
+\markup { \override #'(font-features . ("onum" "smcp" "salt 1"))
+ { Multiple features: Hello 0123456789 εφπρθ } }
+@end lilypond
+
+@noindent For the full OpenType font feature list please see:
+@uref{https://www.microsoft.com/typography/otspec/featurelist.htm}
+
+@noindent For identifying features of OpenType fonts please see:
+@uref{http://lists.gnu.org/archive/html/lilypond-devel/2017-08/msg00004.html}
+
Although it is easy to switch between preconfigured fonts, it is also
possible to use other fonts, as explained in the following sections:
@ref{Single entry fonts} and @ref{Entire document fonts}.
@seealso
Notation Reference:
-@ref{The Feta font},
+@ref{The Emmentaler font},
@ref{Music notation inside markup},
@ref{Rotating objects},
@ref{Selecting font and font size},
}
@end lilypond
+Note: @code{make-pango-font-tree} resets the notation fonts to default of
+Emmentaler.
+
@c we don't do Helvetica / Courier, since GS incorrectly loads
@c Apple TTF fonts
+The following syntax allows you to change the specific fonts,
+leaving others to the default values.
+The following example has the same effect
+as the above @code{make-pango-font-tree} example.
+The same as @code{make-pango-font-tree},
+you can specify a comma-separated list of @q{fonts} for @code{roman},
+@code{sans}, and @code{typewriter} categories.
+If you don't change the staff size from the default of 20 pt,
+@code{#:factor (/ staff-height pt 20)} is unnecessary.
+
+@funindex set-global-fonts
+
+@example
+\paper @{
+ #(define fonts
+ (set-global-fonts
+ #:roman "Times New Roman"
+ #:sans "Nimbus Sans,Nimbus Sans L"
+ #:typewriter "Luxi Mono"
+ #:factor (/ staff-height pt 20) ; unnecessary if the staff size is default
+ ))
+@}
+@end example
+
+It also can specify the notation fonts.
+The following example also has the same effect as the above examples,
+because it sets the notation fonts as the default.
+For more information, see @ref{Replacing the notation font}.
+
+@example
+\paper @{
+ #(define fonts
+ (set-global-fonts
+ #:music "emmentaler" ; default
+ #:brace "emmentaler" ; default
+ #:roman "Times New Roman"
+ #:sans "Nimbus Sans,Nimbus Sans L"
+ #:typewriter "Luxi Mono"
+ #:factor (/ staff-height pt 20) ; unnecessary if the staff size is default
+ ))
+@}
+@end example
+
+Note: Each call to @code{set-global-fonts} completely resets both the main
+notation and text fonts. If any category is left unspecified, then the default
+font will be used for that category.
+Each call of @code{set-global-fonts} affects each @code{\book} blocks that
+follow it.
+If there are multiple @code{\book} blocks and you want to use different fonts
+for each, simply call @code{set-global-fonts} again, like this:
+
+@example
+\paper @{
+ #(define fonts
+ (set-global-fonts
+ @dots{}
+ ))
+@}
+\book @{
+ @dots{}
+@}
+
+\paper @{
+ #(define fonts
+ (set-global-fonts
+ @dots{}
+ ))
+@}
+\book @{
+ @dots{}
+@}
+@end example
+
@seealso
Notation Reference:
@ref{Fonts explained},
@ref{Single entry fonts},
@ref{Selecting font and font size},
-@ref{Font}.
+@ref{Font},
+@ref{Replacing the notation font}.