1 @c -*- coding: utf-8; mode: texinfo; -*-
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 When revising a translation, copy the HEAD committish of the
6 version that you are working on. See TRANSLATION for details.
14 @lilypondfile[quote]{text-headword.ly}
16 This section explains how to include text (with various
17 formatting) in music scores.
20 Some text elements that are not dealt with here are discussed in other
21 specific sections: @ref{Vocal music}, @ref{Titles and headers}.
30 @subsection Writing text
32 This section introduces different ways of adding text to a score.
34 @cindex Text, other languages
35 @warning{To write accented and special text (such as characters
36 from other languages), simply insert the characters directly into
37 the LilyPond file. The file must be saved as UTF-8. For more
38 information, see @ref{Text encoding}.}
49 @unnumberedsubsubsec Text scripts
52 @cindex text items, non-empty
53 @cindex non-empty texts
56 Simple @qq{quoted text} indications may be added to a score, as
57 demonstrated in the following example. Such indications may be
58 manually placed above or below the staff, using the syntax described
59 in @ref{Direction and placement}.
61 @lilypond[quote,verbatim,relative=2]
62 a8^"pizz." g f e a4-"scherz." f
65 This syntax is actually a shorthand; more complex text
66 formatting may be added to a note by explicitly using a
67 @code{\markup} block, as described in @ref{Formatting text}.
69 @lilypond[quote,verbatim,relative=2]
70 a8^\markup { \italic pizz. } g f e
71 a4_\markup { \tiny scherz. \bold molto } f
74 By default, text indications do not influence the note spacing.
75 However, their widths can be taken into account:
76 in the following example, the first text string does not affect
77 spacing, whereas the second one does.
79 @lilypond[quote,verbatim,relative=2]
85 In addition to text scripts, articulations can be attached to notes.
86 For more information, see @ref{Articulations and ornamentations}.
88 For more information about the relative ordering of text scripts and
89 articulations, see @rlearning{Placement of objects}.
91 @funindex \textLengthOn
92 @funindex textLengthOn
93 @funindex \textLengthOff
94 @funindex textLengthOff
98 @code{\textLengthOff}.
104 @rlearning{Placement of objects}.
107 @ref{Formatting text},
108 @ref{Direction and placement}.
114 @rinternals{TextScript}.
117 @cindex text outside margin
118 @cindex margin, text running over
119 @cindex text, keeping inside margin
120 @cindex lyrics, keeping inside margin
125 Checking to make sure that text scripts and lyrics are within the
126 margins is a relatively large computational task. To speed up
127 processing, LilyPond does not perform such calculations by
128 default; to enable it, use
131 \override Score.PaperColumn #'keep-inside-line = ##t
136 @unnumberedsubsubsec Text spanners
138 @cindex text spanners
140 Some performance indications, e.g., @notation{rallentando} or
141 @notation{accelerando}, are written as text and are extended over
142 multiple notes with dotted lines. Such objects, called @qq{spanners},
143 may be created from one note to another using the following syntax:
145 @lilypond[verbatim,quote,relative=2]
146 \override TextSpanner #'(bound-details left text) = "rit."
151 @cindex text spanners, formatting
152 @cindex formatting text spanners
155 The string to be printed is set through object properties. By default
156 it is printed in italic characters, but different formatting can be
157 obtained using @code{\markup} blocks, as described in @ref{Formatting
160 @lilypond[quote,relative=2,verbatim]
161 \override TextSpanner #'(bound-details left text) =
162 \markup { \upright "rit." }
167 The line style, as well as the text string, can be defined as an
168 object property. This syntax is described in @ref{Line styles}.
171 @funindex \textSpannerUp
172 @funindex textSpannerUp
173 @funindex \textSpannerDown
174 @funindex textSpannerDown
175 @funindex \textSpannerNeutral
176 @funindex textSpannerNeutral
180 @code{\textSpannerUp},
181 @code{\textSpannerDown},
182 @code{\textSpannerNeutral}.
195 @rinternals{TextSpanner}.
199 @unnumberedsubsubsec Text marks
204 @cindex text on bar line
205 @cindex coda on bar line
206 @cindex segno on bar line
207 @cindex fermata on bar line
208 @cindex bar lines, symbols on
215 Various text elements may be added to a score using
216 the syntax described in @ref{Rehearsal marks}:
218 @c \mark needs to be placed on a separate line (it's not
219 @c attached to an object like \markup is). -vv
221 @lilypond[verbatim,quote,relative=2]
227 This syntax makes it possible to put any text on a bar line;
228 more complex text formatting may be added using a @code{\markup}
229 block, as described in @ref{Formatting text}:
231 @lilypond[quote,verbatim,relative=1]
233 \mark \markup { \italic { colla parte } }
239 This syntax also allows to print special signs, like coda, segno
240 or fermata, by specifying the appropriate symbol name as explained in
241 @ref{Music notation inside markup}:
243 @lilypond[quote,verbatim,relative=2]
245 \mark \markup { \musicglyph #"scripts.ufermata" }
250 Such objects are only typeset above the top staff of the score; depending on
251 whether they are specified at the end or the middle of a bar, they
252 can be placed above the bar line or between notes. When specified at a
253 line break, the mark will be printed at the beginning of the next line.
255 @lilypond[quote,verbatim,relative=2]
265 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
266 {printing-marks-at-the-end-of-a-line.ly}
268 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
269 {aligning-marks-with-various-notation-objects.ly}
271 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
272 {printing-marks-on-every-staff.ly}
277 @ref{Rehearsal marks},
278 @ref{Formatting text},
279 @ref{Music notation inside markup},
286 @rinternals{MarkEvent},
287 @rinternals{Mark_engraver},
288 @rinternals{RehearsalMark}.
292 @unnumberedsubsubsec Separate text
294 @cindex separate text
295 @cindex text, separate
296 @cindex standalone text
297 @cindex top-level text
298 @cindex text, top-level
299 @cindex text, standalone
304 A @code{\markup} block can exist by itself, outside of any
305 any @code{\score} block, as a @qq{top-level
306 expression}. This syntax is described in @ref{File structure}.
308 @lilypond[verbatim,quote]
310 Tomorrow, and tomorrow, and tomorrow...
315 This allows printing text separately from the music, which is
316 particularly useful when the input file contains several music pieces,
317 as described in @ref{Multiple scores in a book}.
319 @lilypond[quote,verbatim]
324 Tomorrow, and tomorrow, and tomorrow...
331 Separate text blocks can be spread over multiple pages,
332 making it possible to print text documents or books entirely
333 within LilyPond. This feature, and the specific syntax it
334 requires, are described in @ref{Multi-page markup}.
339 @funindex \markuplines
340 @funindex markuplines
350 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
351 {stand-alone-two-column-markup.ly}
356 @ref{Formatting text},
357 @ref{File structure},
358 @ref{Multiple scores in a book},
359 @ref{Multi-page markup}.
365 @rinternals{TextScript}.
368 @node Formatting text
369 @subsection Formatting text
371 This section presents basic and advanced text formatting,
372 using the @code{\markup} mode specific syntax.
375 * Text markup introduction::
376 * Selecting font and font size::
378 * Graphic notation inside markup::
379 * Music notation inside markup::
380 * Multi-page markup::
383 @node Text markup introduction
384 @unnumberedsubsubsec Text markup introduction
394 A @code{\markup} block is used to typeset text with an extensible
395 syntax called @qq{markup mode}.
397 @cindex markup expressions
398 @cindex expressions, markup
399 @cindex markup syntax
400 @cindex synatax, markup
402 The markup syntax is similar to LilyPond's usual syntax: a
403 @code{\markup} expression is enclosed in curly braces @code{@{
404 @dots{} @}}. A single word is regarded as a minimal expression,
405 and therefore does not need to be enclosed with braces.
407 Unlike simple @qq{quoted text} indications, @code{\markup} blocks may
408 contain nested expressions or markup commands, entered using the
409 backslash @code{\} character. Such commands only affect the first
410 following expression.
412 @lilypond[quote,verbatim,relative=2]
414 a2^\markup { poco \italic più forte }
416 d2_\markup { \italic "string. assai" }
418 b1^\markup { \bold { molto \italic agitato } }
422 @cindex special characters in markup mode
423 @cindex markup mode, special characters
424 @cindex reserved characters, printing
425 @cindex printing reserved characters
426 @cindex printing special characters
427 @cindex quoted text in markup mode
428 @cindex markup mode, quoted text
430 A @code{\markup} block may also contain quoted text strings. Such
431 strings are treated as minimal text expressions, and therefore any
432 markup command or special character (such as @code{\} and @code{#})
433 will be printed verbatim without affecting the formatting of the text.
434 Double quotation marks themselves may be printed by preceding them
437 @lilypond[quote,verbatim,relative=2]
438 a1^"\italic markup..."
439 a_\markup { \italic "... prints \"italic\" letters!" }
443 To be treated as a distinct expression, a list of words needs to be
444 enclosed with double quotes or preceded by a command. The way markup
445 expressions are defined affects how these expressions will be stacked,
446 centered and aligned; in the following example, the second
447 @code{\markup} expression is treated the same as the first one:
449 @lilypond[quote,verbatim,relative=2]
450 c1^\markup { \center-column { a bbb c } }
451 c1^\markup { \center-column { a { bbb c } } }
452 c1^\markup { \center-column { a \line { bbb c } } }
453 c1^\markup { \center-column { a "bbb c" } }
456 Markups can be stored in variables. Such variables may be
457 directly attached to notes:
459 @lilypond[quote,verbatim]
460 allegro = \markup { \bold \large Allegro }
470 An exhaustive list of @code{\markup}-specific commands can be found in
471 @ref{Text markup commands}.
476 @ref{Text markup commands}.
482 @file{scm/@/markup@/.scm}.
487 Syntax errors for markup mode can be confusing.
490 @node Selecting font and font size
491 @unnumberedsubsubsec Selecting font and font size
493 @cindex font switching
494 @cindex changing fonts
495 @cindex switching fonts
504 Basic font switching is supported in markup mode:
506 @lilypond[quote,verbatim,relative=2]
509 \italic { non troppo \underline Vivo }
512 d,_\markup { \italic quasi \smallCaps Tromba }
528 The size of the characters can also be altered in different ways:
531 the font size can be set to predefined standard sizes,
534 the font size can be set to an absolute value,
537 the font size can also be changed relatively to its previous value.
541 The following example demonstrates these three methods:
543 @lilypond[quote,verbatim,relative=1]
550 \fontsize #5 Sinfonia
557 \magnify #0.6 { e sentimento } )
570 Text may be printed as subscript or superscript. By default these are
571 printed in a smaller size, but a normal size can be used as well:
573 @lilypond[quote,verbatim]
576 \line { 1 \super st movement }
577 \line { 1 \normal-size-super st movement
578 \sub { (part two) } }
583 @cindex font families
585 The markup mode provides an easy way to select alternate font
586 families. The default serif font, of roman type, is automatically
587 selected unless specified otherwise; on the last line of the following
588 example, there is no difference between the first and the second word.
590 @lilypond[quote,verbatim]
593 \line { Act \number 1 }
594 \line { \sans { Scene I. } }
595 \line { \typewriter { Verona. An open place. } }
596 \line { Enter \roman Valentine and Proteus. }
602 Some of these font families, used for specific items such as numbers
603 or dynamics, do not provide all characters, as mentioned in @ref{New
604 dynamic marks} and @ref{Manual repeat marks}.
606 @c \concat is actually documented in Align (it is not
607 @c a font-switching command). But we need it here. -vv
609 When used inside a word, some font-switching or formatting commands
610 may produce an unwanted blank space. This can easily be solved by
611 concatenating the text elements together:
613 @lilypond[quote,verbatim]
617 \concat { 1 \super st }
621 \concat { \dynamic p , }
622 \italic { con dolce espressione }
628 An exhaustive list of font switching commands and custom font usage
629 commands can be found in @ref{Font}.
631 Defining custom font sets is also possible, as explained in
640 @funindex \normalsize
667 @ref{New dynamic marks},
668 @ref{Manual repeat marks},
675 @rinternals{TextScript}.
678 @file{scm/@/define@/-markup@/-commands@/.scm}.
682 @unnumberedsubsubsec Text alignment
684 @cindex text, aligning
685 @cindex aligning text
686 @cindex aligning markup text
687 @cindex aligning markups
688 @cindex markups, aligning
689 @cindex markup text, aligning
691 This subsection discusses how to place text in markup mode. Markup
692 objects can also be moved as a whole, using the syntax described in
693 @rlearning{Moving objects}.
695 @c Padding commands should be mentioned on this page, but
696 @c most of these require \box to be more clearly illustrated. -vv
698 @cindex text, horizontal alignment
699 @cindex horizontal text alignment
701 @funindex \left-align
703 @funindex \center-align
704 @funindex center-align
705 @funindex \right-align
706 @funindex right-align
708 Markup objects may be aligned in different ways. By default, a text
709 indication is aligned on its left edge: in the following example,
710 there is no difference between the first and the second markup.
712 @lilypond[quote,verbatim,relative=2]
715 d-\markup { \left-align poco }
717 d-\markup { \center-align { poco } }
719 d-\markup { \right-align poco }
725 Horizontal alignment may be fine-tuned using a numeric value:
727 @lilypond[quote,verbatim,relative=2]
728 a1-\markup { \halign #-1 poco }
730 a,-\markup { \halign #0 poco }
732 a,-\markup { \halign #0.5 poco }
734 a,-\markup { \halign #2 poco }
738 Some objects may have alignment procedures of their own, and therefore
739 are not affected by these commands. It is possible to move such
740 markup objects as a whole, as shown for instance in @ref{Text marks}.
742 @cindex text, vertical alignment
743 @cindex vertical text alignment
752 @c QUERY Should the function of ``\null'' be clarified? rp
754 Vertical alignment is a bit more complex. As stated above, markup
755 objects can be moved as a whole; however, it is also possible to move
756 specific elements inside a markup block. In this case, the element to
757 be moved needs to be preceded with an @emph{anchor point}, that can be
758 another markup element or an invisible object. The following example
759 demonstrates these two possibilities; the last markup in this example
760 has no anchor point, and therefore is not moved.
762 @lilypond[quote,verbatim,relative=1]
765 \raise #2 { Scène 1 }
770 \lower #4 \bold { Très modéré }
774 \raise #4 \italic { Une forêt. }
779 @funindex \general-align
780 @funindex general-align
783 @funindex \translate-scaled
784 @funindex translate-scaled
786 Some commands can affect both the horizontal and vertical alignment of
787 text objects in markup mode. Any object affected by these commands
788 must be preceded with an anchor point:
790 @lilypond[quote,verbatim,relative=1]
793 \translate #'(-1 . 2) "Scène 1"
798 \general-align #Y #3.2 \bold "Très modéré"
803 \translate-scaled #'(-1 . 2) \teeny "Une forêt."
808 @cindex multi-line markup
809 @cindex markup, multi-line
810 @cindex multi-line text
811 @cindex text, multi-line
812 @cindex text in columns
813 @cindex columns, text
817 @funindex \center-column
818 @funindex center-column
820 A markup object may include several lines of text. In the following
821 example, each element or expression is placed on its own line, either
822 left-aligned or centered:
824 @lilypond[quote,verbatim]
840 @cindex centering text on the page
841 @cindex text, centering on the page
842 @cindex markup, centering on the page
847 Similarly, a list of elements or expressions may be spread to fill the
848 entire horizontal line width (if there is only one element, it will be
849 centered on the page). These expressions can, in turn, include
850 multi-line text or any other markup expression:
852 @lilypond[quote,verbatim]
855 \line { William S. Gilbert }
857 \huge \smallCaps "The Mikado"
859 \smallCaps "The Town of Titipu"
861 \line { Sir Arthur Sullivan }
869 @cindex wordwrapped text
870 @cindex justified text
871 @cindex text, justified
872 @cindex text, wordwrapped
873 @cindex markup text, wordwrapped
874 @cindex markup text, justified
881 Long text indications can also be automatically wrapped accordingly to
882 the given line width. These will be either left-aligned or justified,
883 as shown in the following example.
885 @lilypond[quote,verbatim]
888 \line \smallCaps { La vida breve }
889 \line \bold { Acto I }
891 (La escena representa el corral de una casa de
892 gitanos en el AlbaicÃn de Granada. Al fondo una
893 puerta por la que se ve el negro interior de
894 una Fragua, iluminado por los rojos resplandores
899 \line \bold { Acto II }
900 \override #'(line-width . 50)
902 (Calle de Granada. Fachada de la casa de Carmela
903 y su hermano Manuel con grandes ventanas abiertas
904 a través de las que se ve el patio
905 donde se celebra una alegre fiesta)
911 @cindex text alignment commands
912 @cindex markup text alignment commands
913 @cindex alignment, text, commands
915 An exhaustive list of text alignment commands can be found in
921 @rlearning{Moving objects}.
931 @rinternals{TextScript}.
934 @file{scm/@/define@/-markup@/-commands@/.scm}.
937 @node Graphic notation inside markup
938 @unnumberedsubsubsec Graphic notation inside markup
940 @cindex graphics, embedding
941 @cindex drawing graphic objects
942 @cindex graphic objects, drawing
943 @cindex embedding graphic objects
944 @cindex graphic objects, embedding
946 Various graphic objects may be added to a score, using markup
949 @cindex decorating text
951 @cindex text, framing
952 @cindex text, decorating
953 @cindex markup text, decorating
954 @cindex markup text, framing
960 @funindex \rounded-box
961 @funindex rounded-box
967 Some markup commands allow decoration of text elements with graphics,
968 as demonstrated in the following example.
970 @lilypond[quote,verbatim]
979 \bracket "1866 - 1925"
982 \rounded-box \bold Prelude
987 @cindex padding around text
989 @cindex markup text padding
991 @funindex \pad-markup
995 @funindex \pad-to-box
997 @funindex \pad-around
1000 Some commands may require an increase in the padding around the text;
1001 this is achieved with some markup commands exhaustively described in
1004 @lilypond[quote,verbatim]
1005 \markup \fill-line {
1007 \box "Charles Ives (1874 - 1954)"
1009 \box \pad-markup #2 "THE UNANSWERED QUESTION"
1010 \box \pad-x #8 "A Cosmic Landscape"
1017 \box \pad-to-box #'(-5 . 20) #'(0 . 5)
1018 \bold "Largo to Presto"
1021 "String quartet keeps very even time,
1022 Flute quartet keeps very uneven time."
1026 @cindex graphic notation
1027 @cindex symbols, non-musical
1028 @cindex non-musical symbols
1029 @cindex notation, graphic
1033 @funindex \draw-circle
1034 @funindex draw-circle
1035 @funindex \filled-box
1036 @funindex filled-box
1039 @funindex \draw-line
1041 @funindex \arrow-head
1042 @funindex arrow-head
1044 Other graphic elements or symbols may be printed without requiring any
1045 text. As with any markup expression, such objects can be combined.
1047 @lilypond[quote,verbatim]
1050 \draw-circle #4 #0.4 ##f
1051 \filled-box #'(-4 . 4) #'(-0.5 . 0.5) #1
1057 \draw-line #'(0 . 4)
1058 \arrow-head #Y #DOWN ##f
1063 @cindex embedded graphics
1064 @cindex images, embedding
1065 @cindex graphics, embedding
1070 @funindex \postscript
1071 @funindex postscript
1073 Advanced graphic features include the ability to include external
1074 image files converted to the Encapsulated PostScript format
1075 (@emph{eps}), or to directly embed graphics into the input file, using
1076 native PostScript code. In such a case, it may be useful to
1077 explicitely specify the size of the drawing, as demonstrated below:
1079 @lilypond[quote,verbatim,relative=1]
1082 \epsfile #X #10 #"./context-example.eps"
1083 \with-dimensions #'(0 . 6) #'(0 . 10)
1099 An exhaustive list of graphics-specific commands can be found in
1106 @ref{Editorial annotations}.
1111 Internals Reference:
1112 @rinternals{TextScript}.
1115 @file{scm/@/define@/-markup@/-commands@/.scm},
1116 @file{scm/@/stencil@/.scm}.
1119 @node Music notation inside markup
1120 @unnumberedsubsubsec Music notation inside markup
1122 @cindex notation inside markup
1123 @cindex music inside markup
1124 @cindex markup, music notation inside
1126 Various musical notation elements may be added to a score, inside a
1129 Notes and accidentals can be entered using markup commands:
1131 @lilypond[quote,verbatim,relative=2]
1135 \note-by-number #1 #1 #1.5
1138 \natural \semiflat \flat
1139 \sesquiflat \doubleflat
1143 \natural \semisharp \sharp
1144 \sesquisharp \doublesharp
1149 Other notation objects may also be printed
1152 @lilypond[quote,verbatim,relative=1]
1159 fis_\markup { \dynamic rf }
1170 More generally, any available musical symbol may be included
1171 separately in a markup object, as demonstrated below; an exhaustive
1172 list of these symbols and their names can be found in @ref{The Feta
1175 @lilypond[quote,verbatim,relative=2]
1177 c'^\markup { \musicglyph #"eight" }
1179 c,8._\markup { \musicglyph #"clefs.G_change" }
1181 c2^\markup { \musicglyph #"timesig.neomensural94" }
1184 Another way of printing non-text glyphs is described in @ref{Fonts
1185 explained}. This is useful for printing braces of various sizes.
1187 The markup mode also supports diagrams for specific
1190 @lilypond[quote,verbatim,relative=2]
1192 \fret-diagram-terse #"x;x;o;2;3;2;"
1195 \harp-pedal #"^-v|--ov^"
1200 \musicglyph #"accordion.accDiscant"
1202 \raise #0.5 \musicglyph #"accordion.accDot"
1203 \raise #1.5 \musicglyph #"accordion.accDot"
1207 @c The accordion diagram is actually taken from a snippet.
1210 Such diagrams are documented in @ref{Instrument Specific Markup}.
1212 @cindex score inside markup
1213 @cindex markup, score inside
1215 A whole score can even be nested inside a markup object. In such a
1216 case, the nested @code{\score} block must contain a @code{\layout}
1217 block, as demonstrated here:
1219 @lilypond[quote,verbatim,relative=1]
1222 \relative c' { c4 d e f }
1230 An exhaustive list of music notation related commands can be found in
1237 @ref{The Feta font},
1238 @ref{Fonts explained}.
1243 Internals Reference:
1244 @rinternals{TextScript}.
1247 @file{scm/@/define@/-markup@/-commands@/.scm},
1248 @file{scm/@/fret@/-diagrams@/.scm},
1249 @file{scm/@/harp@/-pedals@/.scm}.
1252 @node Multi-page markup
1253 @unnumberedsubsubsec Multi-page markup
1255 @cindex multi-page markup
1256 @cindex markup, multi-page
1257 @cindex markup text, multi-page
1258 @cindex text spread over multiple pages
1260 @funindex \markuplines
1261 @funindex markuplines
1262 @funindex \justified-lines
1263 @funindex justified-lines
1264 @funindex \wordwrap-lines
1265 @funindex wordwrap-lines
1267 Although standard markup objects are not breakable, a specific syntax
1268 makes it possible to enter lines of text that can spread over multiple
1271 @lilypond[quote,verbatim]
1274 A very long text of justified lines.
1278 Another very long paragraph.
1285 This syntax accepts a list of markups, that can be
1288 the result of a markup list command,
1292 a list of markup lists.
1295 An exhaustive list of markup list commands can be found in
1296 @ref{Text markup list commands}.
1301 @ref{Text markup list commands},
1307 @rextend{New markup list command definition}.
1309 Internals Reference:
1310 @rinternals{TextScript}.
1313 @file{scm/@/define@/-markup@/-commands@/.scm}.
1316 @funindex \markuplines
1317 @funindex markuplines
1320 @code{\markuplines}.
1327 This section presents the way fonts are handled, and how they may be
1332 * Single entry fonts::
1333 * Entire document fonts::
1336 @node Fonts explained
1337 @unnumberedsubsubsec Fonts explained
1340 @cindex fonts, explained
1341 @cindex braces, various sizes
1342 @cindex fonts, non-text in markup
1343 @cindex non-text fonts in markup
1345 @funindex font-interface
1347 Fonts are handled through several libraries. FontConfig is used to
1348 detect available fonts on the system; the selected fonts are rendered
1351 Music notation fonts can be described as a set of specific glyphs,
1352 ordered in several families. The following syntax allows various
1353 LilyPond @code{feta} non-text fonts to be used directly in markup
1356 @lilypond[quote,verbatim,relative=2]
1359 \override #'(font-encoding . fetaBraces)
1361 \override #'(font-encoding . fetaNumber)
1363 \override #'(font-encoding . fetaDynamic)
1365 \override #'(font-encoding . fetaMusic)
1366 \lookup #"noteheads.s0petrucci"
1372 However, all these glyphs except the braces of various sizes contained
1373 in @code{fetaBraces} are available using the simpler syntax described
1374 in @ref{Music notation inside markup}.
1376 When using the glyphs contained in @code{fetaBraces}, the size of the
1377 brace is specified by the numerical part of the glyph name, in
1378 arbitrary units. Any integer from @code{0} to @code{575} inclusive
1379 may be specified, @code{0} giving the smallest brace. The optimum
1380 value must be determined by trial and error. These glyphs are all
1381 left braces; right braces may be obtained by rotation, see
1382 @ref{Rotating objects}.
1384 Three families of text fonts are made available: the @emph{roman}
1385 (serif) font, that defaults to New Century Schoolbook, the @emph{sans}
1386 font and the monospaced @emph{typewriter} font -- these last two
1387 families are determined by the Pango installation.
1389 Each family may include different shapes and series. The following
1390 example demonstrates the ability to select alternate families, shapes,
1391 series and sizes. The value supplied to @code{font-size} is the
1392 required change from the default size.
1394 @lilypond[quote,verbatim,relative=2]
1395 \override Score.RehearsalMark #'font-family = #'typewriter
1396 \mark \markup "Ouverture"
1397 \override Voice.TextScript #'font-shape = #'italic
1398 \override Voice.TextScript #'font-series = #'bold
1399 d2.^\markup "Allegro"
1400 \override Voice.TextScript #'font-size = #-3
1405 A similar syntax may be used in markup mode; however in this case it
1406 is preferable to use the simpler syntax explained in @ref{Selecting
1407 font and font size}:
1409 @lilypond[quote,verbatim]
1413 \override #'(font-shape . italic)
1414 \override #'(font-size . 4)
1418 \override #'(font-family . typewriter)
1420 \override #'(font-series . bold)
1424 \override #'(font-family . sans)
1431 Although it is easy to switch between preconfigured fonts, it is also
1432 possible to use other fonts, as explained in the following sections:
1433 @ref{Single entry fonts} and @ref{Entire document fonts}.
1438 @ref{The Feta font},
1439 @ref{Music notation inside markup},
1440 @ref{Selecting font and font size},
1444 @node Single entry fonts
1445 @unnumberedsubsubsec Single entry fonts
1447 Any font that is installed on the operating system and recognized by
1448 FontConfig may be used in a score, using the following syntax:
1450 @lilypond[quote,verbatim,relative=2]
1451 \override Staff.TimeSignature #'font-name = #"Bitstream Charter"
1452 \override Staff.TimeSignature #'font-size = #2
1456 \override #'(font-name . "Vera Bold")
1461 @cindex fonts, finding available
1462 @cindex finding available fonts
1463 @cindex listing available fonts
1464 @cindex available fonts, listing
1466 @funindex show-available-fonts
1468 The following command displays a list of all available fonts on the
1472 lilypond -dshow-available-fonts x
1478 @ref{Fonts explained},
1479 @ref{Entire document fonts}.
1484 @c A source file gets never installed...
1486 @c @file{lily/@/font@/-config@/-scheme@/.cc}.
1489 @node Entire document fonts
1490 @unnumberedsubsubsec Entire document fonts
1492 It is possible to change the fonts to be used as the default fonts in
1493 the @emph{roman}, @emph{sans} and @emph{typewriter} font families by
1494 specifying them, in that order, as shown in the example below. For an
1495 explanation of fonts, see @ref{Fonts explained}.
1497 @cindex font families, setting
1498 @cindex fonts, changing for entire document
1500 @funindex make-pango-font-tree
1502 @lilypond[verbatim,quote]
1506 (make-pango-font-tree "Times New Roman"
1509 (/ myStaffSize 20)))
1516 \typewriter typewriter. }
1520 @c we don't do Helvetica / Courier, since GS incorrectly loads
1526 @ref{Fonts explained},
1527 @ref{Single entry fonts},
1528 @ref{Selecting font and font size},