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]
86 @funindex \textLengthOn
87 @funindex textLengthOn
88 @funindex \textLengthOff
89 @funindex textLengthOff
93 @code{\textLengthOff}.
99 @ref{Formatting text},
100 @ref{Direction and placement}.
106 @rinternals{TextScript}.
109 @cindex text outside margin
110 @cindex margin, text running over
111 @cindex text, keeping inside margin
112 @cindex lyrics, keeping inside margin
117 Checking to make sure that text scripts and lyrics are within the
118 margins is a relatively large computational task. To speed up
119 processing, LilyPond does not perform such calculations by
120 default; to enable it, use
123 \override Score.PaperColumn #'keep-inside-line = ##t
128 @unnumberedsubsubsec Text spanners
130 @cindex text spanners
132 Some performance indications, e.g., @notation{rallentando} or
133 @notation{accelerando}, are written as text and are extended over
134 multiple notes with dotted lines. Such objects, called @qq{spanners},
135 may be created from one note to another using the following syntax:
137 @lilypond[verbatim,quote,relative=2]
138 \override TextSpanner #'(bound-details left text) = "rit."
143 @cindex text spanners, formatting
144 @cindex formatting text spanners
147 The string to be printed is set through object properties. By default
148 it is printed in italic characters, but different formatting can be
149 obtained using @code{\markup} blocks, as described in @ref{Formatting
152 @lilypond[quote,relative=2,verbatim]
153 \override TextSpanner #'(bound-details left text) =
154 \markup { \upright "rit." }
159 The line style, as well as the text string, can be defined as an
160 object property. This syntax is described in @ref{Line styles}.
163 @funindex \textSpannerUp
164 @funindex textSpannerUp
165 @funindex \textSpannerDown
166 @funindex textSpannerDown
167 @funindex \textSpannerNeutral
168 @funindex textSpannerNeutral
172 @code{\textSpannerUp},
173 @code{\textSpannerDown},
174 @code{\textSpannerNeutral}.
187 @rinternals{TextSpanner}.
191 @unnumberedsubsubsec Text marks
196 @cindex text on bar line
197 @cindex coda on bar line
198 @cindex segno on bar line
199 @cindex fermata on bar line
200 @cindex bar lines, symbols on
207 Various text elements may be added to a score using
208 the syntax described in @ref{Rehearsal marks}:
210 @c \mark needs to be placed on a separate line (it's not
211 @c attached to an object like \markup is). -vv
213 @lilypond[verbatim,quote,relative=2]
219 This syntax makes it possible to put any text on a bar line;
220 more complex text formatting may be added using a @code{\markup}
221 block, as described in @ref{Formatting text}:
223 @lilypond[quote,verbatim,relative=1]
225 \mark \markup { \italic { colla parte } }
231 This syntax also allows to print special signs, like coda, segno
232 or fermata, by specifying the appropriate symbol name as explained in
233 @ref{Music notation inside markup}:
235 @lilypond[quote,verbatim,relative=2]
237 \mark \markup { \musicglyph #"scripts.ufermata" }
242 Such objects are only typeset above the top staff of the score; depending on
243 whether they are specified at the end or the middle of a bar, they
244 can be placed above the bar line or between notes. When specified at a
245 line break, the mark will be printed at the beginning of the next line.
247 @lilypond[quote,verbatim,relative=2]
257 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
258 {printing-marks-at-the-end-of-a-line.ly}
260 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
261 {aligning-marks-with-various-notation-objects.ly}
263 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
264 {printing-marks-on-every-staff.ly}
269 @ref{Rehearsal marks},
270 @ref{Formatting text},
271 @ref{Music notation inside markup},
278 @rinternals{MarkEvent},
279 @rinternals{Mark_engraver},
280 @rinternals{RehearsalMark}.
284 @unnumberedsubsubsec Separate text
286 @cindex separate text
287 @cindex text, separate
288 @cindex standalone text
289 @cindex top-level text
290 @cindex text, top-level
291 @cindex text, standalone
296 A @code{\markup} block can exist by itself, outside of any
297 any @code{\score} block, as a @qq{top-level
298 expression}. This syntax is described in @ref{File structure}.
300 @lilypond[verbatim,quote]
302 Tomorrow, and tomorrow, and tomorrow...
307 This allows printing text separately from the music, which is
308 particularly useful when the input file contains several music pieces,
309 as described in @ref{Multiple scores in a book}.
311 @lilypond[quote,verbatim]
316 Tomorrow, and tomorrow, and tomorrow...
323 Separate text blocks can be spread over multiple pages,
324 making it possible to print text documents or books entirely
325 within LilyPond. This feature, and the specific syntax it
326 requires, are described in @ref{Multi-page markup}.
331 @funindex \markuplines
332 @funindex markuplines
342 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
343 {stand-alone-two-column-markup.ly}
348 @ref{Formatting text},
349 @ref{File structure},
350 @ref{Multiple scores in a book},
351 @ref{Multi-page markup}.
357 @rinternals{TextScript}.
360 @node Formatting text
361 @subsection Formatting text
363 This section presents basic and advanced text formatting,
364 using the @code{\markup} mode specific syntax.
367 * Text markup introduction::
368 * Selecting font and font size::
370 * Graphic notation inside markup::
371 * Music notation inside markup::
372 * Multi-page markup::
375 @node Text markup introduction
376 @unnumberedsubsubsec Text markup introduction
386 A @code{\markup} block is used to typeset text with an extensible
387 syntax called @qq{markup mode}.
389 @cindex markup expressions
390 @cindex expressions, markup
391 @cindex markup syntax
392 @cindex synatax, markup
394 The markup syntax is similar to LilyPond's usual syntax: a
395 @code{\markup} expression is enclosed in curly braces @code{@{
396 @dots{} @}}. A single word is regarded as a minimal expression,
397 and therefore does not need to be enclosed with braces.
399 Unlike simple @qq{quoted text} indications, @code{\markup} blocks may
400 contain nested expressions or markup commands, entered using the
401 backslash @code{\} character. Such commands only affect the first
402 following expression.
404 @lilypond[quote,verbatim,relative=2]
406 a2^\markup { poco \italic più forte }
408 d2_\markup { \italic "string. assai" }
410 b1^\markup { \bold { molto \italic agitato } }
414 @cindex special characters in markup mode
415 @cindex markup mode, special characters
416 @cindex reserved characters, printing
417 @cindex printing reserved characters
418 @cindex printing special characters
419 @cindex quoted text in markup mode
420 @cindex markup mode, quoted text
422 A @code{\markup} block may also contain quoted text strings. Such
423 strings are treated as minimal text expressions, and therefore any
424 markup command or special character (such as @code{\} and @code{#})
425 will be printed verbatim without affecting the formatting of the text.
426 Double quotation marks themselves may be printed by preceding them
429 @lilypond[quote,verbatim,relative=2]
430 a1^"\italic markup..."
431 a_\markup { \italic "... prints \"italic\" letters!" }
435 To be treated as a distinct expression, a list of words needs to be
436 enclosed with double quotes or preceded by a command. The way markup
437 expressions are defined affects how these expressions will be stacked,
438 centered and aligned; in the following example, the second
439 @code{\markup} expression is treated the same as the first one:
441 @lilypond[quote,verbatim,relative=2]
442 c1^\markup { \center-column { a bbb c } }
443 c1^\markup { \center-column { a { bbb c } } }
444 c1^\markup { \center-column { a \line { bbb c } } }
445 c1^\markup { \center-column { a "bbb c" } }
448 Markups can be stored in variables. Such variables may be
449 directly attached to notes:
451 @lilypond[quote,verbatim]
452 allegro = \markup { \bold \large Allegro }
462 An exhaustive list of @code{\markup}-specific commands can be found in
463 @ref{Text markup commands}.
468 @ref{Text markup commands}.
474 @file{scm/@/markup@/.scm}.
479 Syntax errors for markup mode can be confusing.
482 @node Selecting font and font size
483 @unnumberedsubsubsec Selecting font and font size
485 @cindex font switching
486 @cindex changing fonts
487 @cindex switching fonts
496 Basic font switching is supported in markup mode:
498 @lilypond[quote,verbatim,relative=2]
501 \italic { non troppo \underline Vivo }
504 d,_\markup { \italic quasi \smallCaps Tromba }
520 The size of the characters can also be altered in different ways:
523 the font size can be set to predefined standard sizes,
526 the font size can be set to an absolute value,
529 the font size can also be changed relatively to its previous value.
533 The following example demonstrates these three methods:
535 @lilypond[quote,verbatim,relative=1]
542 \fontsize #5 Sinfonia
549 \magnify #0.6 { e sentimento } )
562 Text may be printed as subscript or superscript. By default these are
563 printed in a smaller size, but a normal size can be used as well:
565 @lilypond[quote,verbatim]
568 \line { 1 \super st movement }
569 \line { 1 \normal-size-super st movement
570 \sub { (part two) } }
575 @cindex font families
577 The markup mode provides an easy way to select alternate font
578 families. The default serif font, of roman type, is automatically
579 selected unless specified otherwise; on the last line of the following
580 example, there is no difference between the first and the second word.
582 @lilypond[quote,verbatim]
585 \line { Act \number 1 }
586 \line { \sans { Scene I. } }
587 \line { \typewriter { Verona. An open place. } }
588 \line { Enter \roman Valentine and Proteus. }
594 Some of these font families, used for specific items such as numbers
595 or dynamics, do not provide all characters, as mentioned in @ref{New
596 dynamic marks} and @ref{Manual repeat marks}.
598 @c \concat is actually documented in Align (it is not
599 @c a font-switching command). But we need it here. -vv
601 When used inside a word, some font-switching or formatting commands
602 may produce an unwanted blank space. This can easily be solved by
603 concatenating the text elements together:
605 @lilypond[quote,verbatim]
609 \concat { 1 \super st }
613 \concat { \dynamic p , }
614 \italic { con dolce espressione }
620 An exhaustive list of font switching commands and custom font usage
621 commands can be found in @ref{Font}.
623 Defining custom font sets is also possible, as explained in
632 @funindex \normalsize
659 @ref{New dynamic marks},
660 @ref{Manual repeat marks},
667 @rinternals{TextScript}.
670 @file{scm/@/define@/-markup@/-commands@/.scm}.
674 @unnumberedsubsubsec Text alignment
676 @cindex text, aligning
677 @cindex aligning text
678 @cindex aligning markup text
679 @cindex aligning markups
680 @cindex markups, aligning
681 @cindex markup text, aligning
683 This subsection discusses how to place text in markup mode. Markup
684 objects can also be moved as a whole, using the syntax described in
685 @rlearning{Moving objects}.
687 @c Padding commands should be mentioned on this page, but
688 @c most of these require \box to be more clearly illustrated. -vv
690 @cindex text, horizontal alignment
691 @cindex horizontal text alignment
693 @funindex \left-align
695 @funindex \center-align
696 @funindex center-align
697 @funindex \right-align
698 @funindex right-align
700 Markup objects may be aligned in different ways. By default, a text
701 indication is aligned on its left edge: in the following example,
702 there is no difference between the first and the second markup.
704 @lilypond[quote,verbatim,relative=2]
707 d-\markup { \left-align poco }
709 d-\markup { \center-align { poco } }
711 d-\markup { \right-align poco }
717 Horizontal alignment may be fine-tuned using a numeric value:
719 @lilypond[quote,verbatim,relative=2]
720 a1-\markup { \halign #-1 poco }
722 a,-\markup { \halign #0 poco }
724 a,-\markup { \halign #0.5 poco }
726 a,-\markup { \halign #2 poco }
730 Some objects may have alignment procedures of their own, and therefore
731 are not affected by these commands. It is possible to move such
732 markup objects as a whole, as shown for instance in @ref{Text marks}.
734 @cindex text, vertical alignment
735 @cindex vertical text alignment
744 @c QUERY Should the function of ``\null'' be clarified? rp
746 Vertical alignment is a bit more complex. As stated above, markup
747 objects can be moved as a whole; however, it is also possible to move
748 specific elements inside a markup block. In this case, the element to
749 be moved needs to be preceded with an @emph{anchor point}, that can be
750 another markup element or an invisible object. The following example
751 demonstrates these two possibilities; the last markup in this example
752 has no anchor point, and therefore is not moved.
754 @lilypond[quote,verbatim,relative=1]
757 \raise #2 { Scène 1 }
762 \lower #4 \bold { Très modéré }
766 \raise #4 \italic { Une forêt. }
771 @funindex \general-align
772 @funindex general-align
775 @funindex \translate-scaled
776 @funindex translate-scaled
778 Some commands can affect both the horizontal and vertical alignment of
779 text objects in markup mode. Any object affected by these commands
780 must be preceded with an anchor point:
782 @lilypond[quote,verbatim,relative=1]
785 \translate #'(-1 . 2) "Scène 1"
790 \general-align #Y #3.2 \bold "Très modéré"
795 \translate-scaled #'(-1 . 2) \teeny "Une forêt."
800 @cindex multi-line markup
801 @cindex markup, multi-line
802 @cindex multi-line text
803 @cindex text, multi-line
804 @cindex text in columns
805 @cindex columns, text
809 @funindex \center-column
810 @funindex center-column
812 A markup object may include several lines of text. In the following
813 example, each element or expression is placed on its own line, either
814 left-aligned or centered:
816 @lilypond[quote,verbatim]
832 @cindex centering text on the page
833 @cindex text, centering on the page
834 @cindex markup, centering on the page
839 Similarly, a list of elements or expressions may be spread to fill the
840 entire horizontal line width (if there is only one element, it will be
841 centered on the page). These expressions can, in turn, include
842 multi-line text or any other markup expression:
844 @lilypond[quote,verbatim]
847 \line { William S. Gilbert }
849 \huge \smallCaps "The Mikado"
851 \smallCaps "The Town of Titipu"
853 \line { Sir Arthur Sullivan }
861 @cindex wordwrapped text
862 @cindex justified text
863 @cindex text, justified
864 @cindex text, wordwrapped
865 @cindex markup text, wordwrapped
866 @cindex markup text, justified
873 Long text indications can also be automatically wrapped accordingly to
874 the given line width. These will be either left-aligned or justified,
875 as shown in the following example.
877 @lilypond[quote,verbatim]
880 \line \smallCaps { La vida breve }
881 \line \bold { Acto I }
883 (La escena representa el corral de una casa de
884 gitanos en el AlbaicÃn de Granada. Al fondo una
885 puerta por la que se ve el negro interior de
886 una Fragua, iluminado por los rojos resplandores
891 \line \bold { Acto II }
892 \override #'(line-width . 50)
894 (Calle de Granada. Fachada de la casa de Carmela
895 y su hermano Manuel con grandes ventanas abiertas
896 a través de las que se ve el patio
897 donde se celebra una alegre fiesta)
903 @cindex text alignment commands
904 @cindex markup text alignment commands
905 @cindex alignment, text, commands
907 An exhaustive list of text alignment commands can be found in
913 @rlearning{Moving objects}.
923 @rinternals{TextScript}.
926 @file{scm/@/define@/-markup@/-commands@/.scm}.
929 @node Graphic notation inside markup
930 @unnumberedsubsubsec Graphic notation inside markup
932 @cindex graphics, embedding
933 @cindex drawing graphic objects
934 @cindex graphic objects, drawing
935 @cindex embedding graphic objects
936 @cindex graphic objects, embedding
938 Various graphic objects may be added to a score, using markup
941 @cindex decorating text
943 @cindex text, framing
944 @cindex text, decorating
945 @cindex markup text, decorating
946 @cindex markup text, framing
952 @funindex \rounded-box
953 @funindex rounded-box
959 Some markup commands allow decoration of text elements with graphics,
960 as demonstrated in the following example.
962 @lilypond[quote,verbatim]
971 \bracket "1866 - 1925"
974 \rounded-box \bold Prelude
979 @cindex padding around text
981 @cindex markup text padding
983 @funindex \pad-markup
987 @funindex \pad-to-box
989 @funindex \pad-around
992 Some commands may require an increase in the padding around the text;
993 this is achieved with some markup commands exhaustively described in
996 @lilypond[quote,verbatim]
999 \box "Charles Ives (1874 - 1954)"
1001 \box \pad-markup #2 "THE UNANSWERED QUESTION"
1002 \box \pad-x #8 "A Cosmic Landscape"
1009 \box \pad-to-box #'(-5 . 20) #'(0 . 5)
1010 \bold "Largo to Presto"
1013 "String quartet keeps very even time,
1014 Flute quartet keeps very uneven time."
1018 @cindex graphic notation
1019 @cindex symbols, non-musical
1020 @cindex non-musical symbols
1021 @cindex notation, graphic
1025 @funindex \draw-circle
1026 @funindex draw-circle
1027 @funindex \filled-box
1028 @funindex filled-box
1031 @funindex \draw-line
1033 @funindex \arrow-head
1034 @funindex arrow-head
1036 Other graphic elements or symbols may be printed without requiring any
1037 text. As with any markup expression, such objects can be combined.
1039 @lilypond[quote,verbatim]
1042 \draw-circle #4 #0.4 ##f
1043 \filled-box #'(-4 . 4) #'(-0.5 . 0.5) #1
1049 \draw-line #'(0 . 4)
1050 \arrow-head #Y #DOWN ##f
1055 @cindex embedded graphics
1056 @cindex images, embedding
1057 @cindex graphics, embedding
1062 @funindex \postscript
1063 @funindex postscript
1065 Advanced graphic features include the ability to include external
1066 image files converted to the Encapsulated PostScript format
1067 (@emph{eps}), or to directly embed graphics into the input file, using
1068 native PostScript code. In such a case, it may be useful to
1069 explicitely specify the size of the drawing, as demonstrated below:
1071 @lilypond[quote,verbatim,relative=1]
1074 \epsfile #X #10 #"./context-example.eps"
1075 \with-dimensions #'(0 . 6) #'(0 . 10)
1091 An exhaustive list of graphics-specific commands can be found in
1098 @ref{Editorial annotations}.
1103 Internals Reference:
1104 @rinternals{TextScript}.
1107 @file{scm/@/define@/-markup@/-commands@/.scm},
1108 @file{scm/@/stencil@/.scm}.
1111 @node Music notation inside markup
1112 @unnumberedsubsubsec Music notation inside markup
1114 @cindex notation inside markup
1115 @cindex music inside markup
1116 @cindex markup, music notation inside
1118 Various musical notation elements may be added to a score, inside a
1121 Notes and accidentals can be entered using markup commands:
1123 @lilypond[quote,verbatim,relative=2]
1127 \note-by-number #1 #1 #1.5
1130 \natural \semiflat \flat
1131 \sesquiflat \doubleflat
1135 \natural \semisharp \sharp
1136 \sesquisharp \doublesharp
1141 Other notation objects may also be printed
1144 @lilypond[quote,verbatim,relative=1]
1151 fis_\markup { \dynamic rf }
1162 More generally, any available musical symbol may be included
1163 separately in a markup object, as demonstrated below; an exhaustive
1164 list of these symbols and their names can be found in @ref{The Feta
1167 @lilypond[quote,verbatim,relative=2]
1169 c'^\markup { \musicglyph #"eight" }
1171 c,8._\markup { \musicglyph #"clefs.G_change" }
1173 c2^\markup { \musicglyph #"timesig.neomensural94" }
1176 Another way of printing non-text glyphs is described in @ref{Fonts
1177 explained}. This is useful for printing braces of various sizes.
1179 The markup mode also supports diagrams for specific
1182 @lilypond[quote,verbatim,relative=2]
1184 \fret-diagram-terse #"x;x;o;2;3;2;"
1187 \harp-pedal #"^-v|--ov^"
1192 \musicglyph #"accordion.accDiscant"
1194 \raise #0.5 \musicglyph #"accordion.accDot"
1195 \raise #1.5 \musicglyph #"accordion.accDot"
1199 @c The accordion diagram is actually taken from a snippet.
1202 Such diagrams are documented in @ref{Instrument Specific Markup}.
1204 @cindex score inside markup
1205 @cindex markup, score inside
1207 A whole score can even be nested inside a markup object. In such a
1208 case, the nested @code{\score} block must contain a @code{\layout}
1209 block, as demonstrated here:
1211 @lilypond[quote,verbatim,relative=1]
1214 \relative c' { c4 d e f }
1222 An exhaustive list of music notation related commands can be found in
1229 @ref{The Feta font},
1230 @ref{Fonts explained}.
1235 Internals Reference:
1236 @rinternals{TextScript}.
1239 @file{scm/@/define@/-markup@/-commands@/.scm},
1240 @file{scm/@/fret@/-diagrams@/.scm},
1241 @file{scm/@/harp@/-pedals@/.scm}.
1244 @node Multi-page markup
1245 @unnumberedsubsubsec Multi-page markup
1247 @cindex multi-page markup
1248 @cindex markup, multi-page
1249 @cindex markup text, multi-page
1250 @cindex text spread over multiple pages
1252 @funindex \markuplines
1253 @funindex markuplines
1254 @funindex \justified-lines
1255 @funindex justified-lines
1256 @funindex \wordwrap-lines
1257 @funindex wordwrap-lines
1259 Although standard markup objects are not breakable, a specific syntax
1260 makes it possible to enter lines of text that can spread over multiple
1263 @lilypond[quote,verbatim]
1266 A very long text of justified lines.
1270 Another very long paragraph.
1277 This syntax accepts a list of markups, that can be
1280 the result of a markup list command,
1284 a list of markup lists.
1287 An exhaustive list of markup list commands can be found in
1288 @ref{Text markup list commands}.
1293 @ref{Text markup list commands},
1299 @rextend{New markup list command definition}.
1301 Internals Reference:
1302 @rinternals{TextScript}.
1305 @file{scm/@/define@/-markup@/-commands@/.scm}.
1308 @funindex \markuplines
1309 @funindex markuplines
1312 @code{\markuplines}.
1319 This section presents the way fonts are handled, and how they may be
1324 * Single entry fonts::
1325 * Entire document fonts::
1328 @node Fonts explained
1329 @unnumberedsubsubsec Fonts explained
1332 @cindex fonts, explained
1333 @cindex braces, various sizes
1334 @cindex fonts, non-text in markup
1335 @cindex non-text fonts in markup
1337 @funindex font-interface
1339 Fonts are handled through several libraries. FontConfig is used to
1340 detect available fonts on the system; the selected fonts are rendered
1343 Music notation fonts can be described as a set of specific glyphs,
1344 ordered in several families. The following syntax allows various
1345 LilyPond @code{feta} non-text fonts to be used directly in markup
1348 @lilypond[quote,verbatim,relative=2]
1351 \override #'(font-encoding . fetaBraces)
1353 \override #'(font-encoding . fetaNumber)
1355 \override #'(font-encoding . fetaDynamic)
1357 \override #'(font-encoding . fetaMusic)
1358 \lookup #"noteheads.s0petrucci"
1364 However, all these glyphs except the braces of various sizes contained
1365 in @code{fetaBraces} are available using the simpler syntax described
1366 in @ref{Music notation inside markup}.
1368 When using the glyphs contained in @code{fetaBraces}, the size of the
1369 brace is specified by the numerical part of the glyph name, in
1370 arbitrary units. Any integer from @code{0} to @code{575} inclusive
1371 may be specified, @code{0} giving the smallest brace. The optimum
1372 value must be determined by trial and error. These glyphs are all
1373 left braces; right braces may be obtained by rotation, see
1374 @ref{Rotating objects}.
1376 Three families of text fonts are made available: the @emph{roman}
1377 (serif) font, that defaults to New Century Schoolbook, the @emph{sans}
1378 font and the monospaced @emph{typewriter} font -- these last two
1379 families are determined by the Pango installation.
1381 Each family may include different shapes and series. The following
1382 example demonstrates the ability to select alternate families, shapes,
1383 series and sizes. The value supplied to @code{font-size} is the
1384 required change from the default size.
1386 @lilypond[quote,verbatim,relative=2]
1387 \override Score.RehearsalMark #'font-family = #'typewriter
1388 \mark \markup "Ouverture"
1389 \override Voice.TextScript #'font-shape = #'italic
1390 \override Voice.TextScript #'font-series = #'bold
1391 d2.^\markup "Allegro"
1392 \override Voice.TextScript #'font-size = #-3
1397 A similar syntax may be used in markup mode; however in this case it
1398 is preferable to use the simpler syntax explained in @ref{Selecting
1399 font and font size}:
1401 @lilypond[quote,verbatim]
1405 \override #'(font-shape . italic)
1406 \override #'(font-size . 4)
1410 \override #'(font-family . typewriter)
1412 \override #'(font-series . bold)
1416 \override #'(font-family . sans)
1423 Although it is easy to switch between preconfigured fonts, it is also
1424 possible to use other fonts, as explained in the following sections:
1425 @ref{Single entry fonts} and @ref{Entire document fonts}.
1430 @ref{The Feta font},
1431 @ref{Music notation inside markup},
1432 @ref{Selecting font and font size},
1436 @node Single entry fonts
1437 @unnumberedsubsubsec Single entry fonts
1439 Any font that is installed on the operating system and recognized by
1440 FontConfig may be used in a score, using the following syntax:
1442 @lilypond[quote,verbatim,relative=2]
1443 \override Staff.TimeSignature #'font-name = #"Bitstream Charter"
1444 \override Staff.TimeSignature #'font-size = #2
1448 \override #'(font-name . "Vera Bold")
1453 @cindex fonts, finding available
1454 @cindex finding available fonts
1455 @cindex listing available fonts
1456 @cindex available fonts, listing
1458 @funindex show-available-fonts
1460 The following command displays a list of all available fonts on the
1464 lilypond -dshow-available-fonts x
1470 @ref{Fonts explained},
1471 @ref{Entire document fonts}.
1476 @c A source file gets never installed...
1478 @c @file{lily/@/font@/-config@/-scheme@/.cc}.
1481 @node Entire document fonts
1482 @unnumberedsubsubsec Entire document fonts
1484 It is possible to change the fonts to be used as the default fonts in
1485 the @emph{roman}, @emph{sans} and @emph{typewriter} font families by
1486 specifying them, in that order, as shown in the example below. For an
1487 explanation of fonts, see @ref{Fonts explained}.
1489 @cindex font families, setting
1490 @cindex fonts, changing for entire document
1492 @funindex make-pango-font-tree
1494 @lilypond[verbatim,quote]
1498 (make-pango-font-tree "Times New Roman"
1501 (/ myStaffSize 20)))
1508 \typewriter typewriter. }
1512 @c we don't do Helvetica / Courier, since GS incorrectly loads
1518 @ref{Fonts explained},
1519 @ref{Single entry fonts},
1520 @ref{Selecting font and font size},