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. For details, see the Contributors'
7 Guide, node Updating translation committishes..
15 @lilypondfile[quote]{text-headword.ly}
17 This section explains how to include text (with various
18 formatting) in music scores.
21 Some text elements that are not dealt with here are discussed in other
22 specific sections: @ref{Vocal music}, @ref{Titles and headers}.
31 @subsection Writing text
33 This section introduces different ways of adding text to a score.
35 @cindex Text, other languages
36 @warning{To write accented and special text (such as characters
37 from other languages), simply insert the characters directly into
38 the LilyPond file. The file must be saved as UTF-8. For more
39 information, see @ref{Text encoding}.}
50 @unnumberedsubsubsec Text scripts
53 @cindex text items, non-empty
54 @cindex non-empty texts
57 Simple @qq{quoted text} indications may be added to a score, as
58 demonstrated in the following example. Such indications may be
59 manually placed above or below the staff, using the syntax described
60 in @ref{Direction and placement}.
62 @lilypond[quote,verbatim,relative=2]
63 a8^"pizz." g f e a4-"scherz." f
66 This syntax is actually a shorthand; more complex text
67 formatting may be added to a note by explicitly using a
68 @code{\markup} block, as described in @ref{Formatting text}.
70 @lilypond[quote,verbatim,relative=2]
71 a8^\markup { \italic pizz. } g f e
72 a4_\markup { \tiny scherz. \bold molto } f
75 By default, text indications do not influence the note spacing.
76 However, their widths can be taken into account:
77 in the following example, the first text string does not affect
78 spacing, whereas the second one does.
80 @lilypond[quote,verbatim,relative=2]
86 In addition to text scripts, articulations can be attached to notes.
87 For more information, see @ref{Articulations and ornamentations}.
89 For more information about the relative ordering of text scripts and
90 articulations, see @rlearning{Placement of objects}.
92 @funindex \textLengthOn
93 @funindex textLengthOn
94 @funindex \textLengthOff
95 @funindex textLengthOff
99 @code{\textLengthOff}.
105 @rlearning{Placement of objects}.
108 @ref{Formatting text},
109 @ref{Direction and placement}.
115 @rinternals{TextScript}.
118 @cindex text outside margin
119 @cindex margin, text running over
120 @cindex text, keeping inside margin
121 @cindex lyrics, keeping inside margin
126 Checking to make sure that text scripts and lyrics are within the
127 margins is a relatively large computational task. To speed up
128 processing, LilyPond does not perform such calculations by
129 default; to enable it, use
132 \override Score.PaperColumn #'keep-inside-line = ##t
137 @unnumberedsubsubsec Text spanners
139 @cindex text spanners
141 Some performance indications, e.g., @notation{rallentando} or
142 @notation{accelerando}, are written as text and are extended over
143 multiple notes with dotted lines. Such objects, called @qq{spanners},
144 may be created from one note to another using the following syntax:
146 @lilypond[verbatim,quote,relative=2]
147 \override TextSpanner #'(bound-details left text) = "rit."
152 @cindex text spanners, formatting
153 @cindex formatting text spanners
156 The string to be printed is set through object properties. By default
157 it is printed in italic characters, but different formatting can be
158 obtained using @code{\markup} blocks, as described in @ref{Formatting
161 @lilypond[quote,relative=2,verbatim]
162 \override TextSpanner #'(bound-details left text) =
163 \markup { \upright "rit." }
168 The line style, as well as the text string, can be defined as an
169 object property. This syntax is described in @ref{Line styles}.
172 @funindex \textSpannerUp
173 @funindex textSpannerUp
174 @funindex \textSpannerDown
175 @funindex textSpannerDown
176 @funindex \textSpannerNeutral
177 @funindex textSpannerNeutral
181 @code{\textSpannerUp},
182 @code{\textSpannerDown},
183 @code{\textSpannerNeutral}.
196 @rinternals{TextSpanner}.
200 @unnumberedsubsubsec Text marks
205 @cindex text on bar line
206 @cindex coda on bar line
207 @cindex segno on bar line
208 @cindex fermata on bar line
209 @cindex bar lines, symbols on
216 Various text elements may be added to a score using
217 the syntax described in @ref{Rehearsal marks}:
219 @c \mark needs to be placed on a separate line (it's not
220 @c attached to an object like \markup is). -vv
222 @lilypond[verbatim,quote,relative=2]
228 This syntax makes it possible to put any text on a bar line;
229 more complex text formatting may be added using a @code{\markup}
230 block, as described in @ref{Formatting text}:
232 @lilypond[quote,verbatim,relative=1]
234 \mark \markup { \italic { colla parte } }
240 This syntax also allows to print special signs, like coda, segno
241 or fermata, by specifying the appropriate symbol name as explained in
242 @ref{Music notation inside markup}:
244 @lilypond[quote,verbatim,relative=2]
246 \mark \markup { \musicglyph #"scripts.ufermata" }
251 Such objects are only typeset above the top staff of the score; depending on
252 whether they are specified at the end or the middle of a bar, they
253 can be placed above the bar line or between notes. When specified at a
254 line break, the mark will be printed at the beginning of the next line.
256 @lilypond[quote,verbatim,relative=2]
266 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
267 {printing-marks-at-the-end-of-a-line.ly}
269 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
270 {aligning-marks-with-various-notation-objects.ly}
272 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
273 {printing-marks-on-every-staff.ly}
278 @ref{Rehearsal marks},
279 @ref{Formatting text},
280 @ref{Music notation inside markup},
287 @rinternals{MarkEvent},
288 @rinternals{Mark_engraver},
289 @rinternals{RehearsalMark}.
293 @unnumberedsubsubsec Separate text
295 @cindex separate text
296 @cindex text, separate
297 @cindex standalone text
298 @cindex top-level text
299 @cindex text, top-level
300 @cindex text, standalone
305 A @code{\markup} block can exist by itself, outside of any
306 @code{\score} block, as a @qq{top-level expression}. This syntax
307 is described in @ref{File structure}.
309 @lilypond[verbatim,quote]
311 Tomorrow, and tomorrow, and tomorrow...
316 This allows printing text separately from the music, which is
317 particularly useful when the input file contains several music pieces,
318 as described in @ref{Multiple scores in a book}.
320 @lilypond[quote,verbatim]
325 Tomorrow, and tomorrow, and tomorrow...
332 Separate text blocks can be spread over multiple pages,
333 making it possible to print text documents or books entirely
334 within LilyPond. This feature, and the specific syntax it
335 requires, are described in @ref{Multi-page markup}.
340 @funindex \markuplines
341 @funindex markuplines
351 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
352 {stand-alone-two-column-markup.ly}
357 @ref{Formatting text},
358 @ref{File structure},
359 @ref{Multiple scores in a book},
360 @ref{Multi-page markup}.
366 @rinternals{TextScript}.
369 @node Formatting text
370 @subsection Formatting text
372 This section presents basic and advanced text formatting,
373 using the @code{\markup} mode specific syntax.
376 * Text markup introduction::
377 * Selecting font and font size::
379 * Graphic notation inside markup::
380 * Music notation inside markup::
381 * Multi-page markup::
384 @node Text markup introduction
385 @unnumberedsubsubsec Text markup introduction
395 A @code{\markup} block is used to typeset text with an extensible
396 syntax called @qq{markup mode}.
398 @cindex markup expressions
399 @cindex expressions, markup
400 @cindex markup syntax
401 @cindex syntax, markup
403 The markup syntax is similar to LilyPond's usual syntax: a
404 @code{\markup} expression is enclosed in curly braces @code{@{
405 @dots{} @}}. A single word is regarded as a minimal expression,
406 and therefore does not need to be enclosed with braces.
408 Unlike simple @qq{quoted text} indications, @code{\markup} blocks may
409 contain nested expressions or markup commands, entered using the
410 backslash @code{\} character. Such commands only affect the first
411 following expression.
413 @lilypond[quote,verbatim,relative=2]
415 a2^\markup { poco \italic più forte }
417 d2_\markup { \italic "string. assai" }
419 b1^\markup { \bold { molto \italic agitato } }
423 @cindex special characters in markup mode
424 @cindex markup mode, special characters
425 @cindex reserved characters, printing
426 @cindex printing reserved characters
427 @cindex printing special characters
428 @cindex quoted text in markup mode
429 @cindex markup mode, quoted text
431 A @code{\markup} block may also contain quoted text strings. Such
432 strings are treated as minimal text expressions, and therefore any
433 markup command or special character (such as @code{\} and @code{#})
434 will be printed verbatim without affecting the formatting of the text.
435 Double quotation marks themselves may be printed by preceding them
438 @lilypond[quote,verbatim,relative=2]
439 a1^"\italic markup..."
440 a_\markup { \italic "... prints \"italic\" letters!" }
444 To be treated as a distinct expression, a list of words needs to be
445 enclosed with double quotes or preceded by a command. The way markup
446 expressions are defined affects how these expressions will be stacked,
447 centered and aligned; in the following example, the second
448 @code{\markup} expression is treated the same as the first one:
450 @lilypond[quote,verbatim,relative=2]
451 c1^\markup { \center-column { a bbb c } }
452 c1^\markup { \center-column { a { bbb c } } }
453 c1^\markup { \center-column { a \line { bbb c } } }
454 c1^\markup { \center-column { a "bbb c" } }
457 Markups can be stored in variables. Such variables may be
458 directly attached to notes:
460 @lilypond[quote,verbatim]
461 allegro = \markup { \bold \large Allegro }
471 An exhaustive list of @code{\markup}-specific commands can be found in
472 @ref{Text markup commands}.
477 @ref{Text markup commands}.
483 @file{scm/@/markup@/.scm}.
488 Syntax errors for markup mode can be confusing.
491 @node Selecting font and font size
492 @unnumberedsubsubsec Selecting font and font size
494 @cindex font switching
495 @cindex changing fonts
496 @cindex switching fonts
505 Basic font switching is supported in markup mode:
507 @lilypond[quote,verbatim,relative=2]
510 \italic { non troppo \underline Vivo }
513 d,_\markup { \italic quasi \smallCaps Tromba }
529 The size of the characters can also be altered in different ways:
532 the font size can be set to predefined standard sizes,
535 the font size can be set to an absolute value,
538 the font size can also be changed relatively to its previous value.
542 The following example demonstrates these three methods:
544 @lilypond[quote,verbatim,relative=1]
551 \fontsize #5 Sinfonia
558 \magnify #0.6 { e sentimento } )
571 Text may be printed as subscript or superscript. By default these are
572 printed in a smaller size, but a normal size can be used as well:
574 @lilypond[quote,verbatim]
577 \line { 1 \super st movement }
578 \line { 1 \normal-size-super st movement
579 \sub { (part two) } }
584 @cindex font families
586 The markup mode provides an easy way to select alternate font
587 families. The default serif font, of roman type, is automatically
588 selected unless specified otherwise; on the last line of the following
589 example, there is no difference between the first and the second word.
591 @lilypond[quote,verbatim]
594 \line { Act \number 1 }
595 \line { \sans { Scene I. } }
596 \line { \typewriter { Verona. An open place. } }
597 \line { Enter \roman Valentine and Proteus. }
603 Some of these font families, used for specific items such as numbers
604 or dynamics, do not provide all characters, as mentioned in @ref{New
605 dynamic marks} and @ref{Manual repeat marks}.
607 @c \concat is actually documented in Align (it is not
608 @c a font-switching command). But we need it here. -vv
610 When used inside a word, some font-switching or formatting commands
611 may produce an unwanted blank space. This can easily be solved by
612 concatenating the text elements together:
614 @lilypond[quote,verbatim]
618 \concat { 1 \super st }
622 \concat { \dynamic p , }
623 \italic { con dolce espressione }
629 An exhaustive list of font switching commands and custom font usage
630 commands can be found in @ref{Font}.
632 Defining custom font sets is also possible, as explained in
641 @funindex \normalsize
668 @ref{New dynamic marks},
669 @ref{Manual repeat marks},
676 @rinternals{TextScript}.
679 @file{scm/@/define@/-markup@/-commands@/.scm}.
683 @unnumberedsubsubsec Text alignment
685 @cindex text, aligning
686 @cindex aligning text
687 @cindex aligning markup text
688 @cindex aligning markups
689 @cindex markups, aligning
690 @cindex markup text, aligning
692 This subsection discusses how to place text in markup mode. Markup
693 objects can also be moved as a whole, using the syntax described in
694 @rlearning{Moving objects}.
696 @c Padding commands should be mentioned on this page, but
697 @c most of these require \box to be more clearly illustrated. -vv
699 @cindex text, horizontal alignment
700 @cindex horizontal text alignment
702 @funindex \left-align
704 @funindex \center-align
705 @funindex center-align
706 @funindex \right-align
707 @funindex right-align
709 Markup objects may be aligned in different ways. By default, a text
710 indication is aligned on its left edge: in the following example,
711 there is no difference between the first and the second markup.
713 @lilypond[quote,verbatim,relative=2]
716 d-\markup { \left-align poco }
718 d-\markup { \center-align { poco } }
720 d-\markup { \right-align poco }
726 Horizontal alignment may be fine-tuned using a numeric value:
728 @lilypond[quote,verbatim,relative=2]
729 a1-\markup { \halign #-1 poco }
731 a,-\markup { \halign #0 poco }
733 a,-\markup { \halign #0.5 poco }
735 a,-\markup { \halign #2 poco }
739 Some objects may have alignment procedures of their own, and therefore
740 are not affected by these commands. It is possible to move such
741 markup objects as a whole, as shown for instance in @ref{Text marks}.
743 @cindex text, vertical alignment
744 @cindex vertical text alignment
753 @c QUERY Should the function of ``\null'' be clarified? rp
755 Vertical alignment is a bit more complex. As stated above, markup
756 objects can be moved as a whole; however, it is also possible to move
757 specific elements inside a markup block. In this case, the element to
758 be moved needs to be preceded with an @emph{anchor point}, that can be
759 another markup element or an invisible object. The following example
760 demonstrates these two possibilities; the last markup in this example
761 has no anchor point, and therefore is not moved.
763 @lilypond[quote,verbatim,relative=1]
766 \raise #2 { Scène 1 }
771 \lower #4 \bold { Très modéré }
775 \raise #4 \italic { Une forêt. }
780 @funindex \general-align
781 @funindex general-align
784 @funindex \translate-scaled
785 @funindex translate-scaled
787 Some commands can affect both the horizontal and vertical alignment of
788 text objects in markup mode. Any object affected by these commands
789 must be preceded with an anchor point:
791 @lilypond[quote,verbatim,relative=1]
794 \translate #'(-1 . 2) "Scène 1"
799 \general-align #Y #3.2 \bold "Très modéré"
804 \translate-scaled #'(-1 . 2) \teeny "Une forêt."
809 @cindex multi-line markup
810 @cindex markup, multi-line
811 @cindex multi-line text
812 @cindex text, multi-line
813 @cindex text in columns
814 @cindex columns, text
818 @funindex \center-column
819 @funindex center-column
821 A markup object may include several lines of text. In the following
822 example, each element or expression is placed on its own line, either
823 left-aligned or centered:
825 @lilypond[quote,verbatim]
841 @cindex centering text on the page
842 @cindex text, centering on the page
843 @cindex markup, centering on the page
848 Similarly, a list of elements or expressions may be spread to fill the
849 entire horizontal line width (if there is only one element, it will be
850 centered on the page). These expressions can, in turn, include
851 multi-line text or any other markup expression:
853 @lilypond[quote,verbatim]
856 \line { William S. Gilbert }
858 \huge \smallCaps "The Mikado"
860 \smallCaps "The Town of Titipu"
862 \line { Sir Arthur Sullivan }
870 @cindex wordwrapped text
871 @cindex justified text
872 @cindex text, justified
873 @cindex text, wordwrapped
874 @cindex markup text, wordwrapped
875 @cindex markup text, justified
882 Long text indications can also be automatically wrapped accordingly to
883 the given line width. These will be either left-aligned or justified,
884 as shown in the following example.
886 @lilypond[quote,verbatim]
889 \line \smallCaps { La vida breve }
890 \line \bold { Acto I }
892 (La escena representa el corral de una casa de
893 gitanos en el AlbaicÃn de Granada. Al fondo una
894 puerta por la que se ve el negro interior de
895 una Fragua, iluminado por los rojos resplandores
900 \line \bold { Acto II }
901 \override #'(line-width . 50)
903 (Calle de Granada. Fachada de la casa de Carmela
904 y su hermano Manuel con grandes ventanas abiertas
905 a través de las que se ve el patio
906 donde se celebra una alegre fiesta)
912 @cindex text alignment commands
913 @cindex markup text alignment commands
914 @cindex alignment, text, commands
916 An exhaustive list of text alignment commands can be found in
922 @rlearning{Moving objects}.
932 @rinternals{TextScript}.
935 @file{scm/@/define@/-markup@/-commands@/.scm}.
938 @node Graphic notation inside markup
939 @unnumberedsubsubsec Graphic notation inside markup
941 @cindex graphics, embedding
942 @cindex drawing graphic objects
943 @cindex graphic objects, drawing
944 @cindex embedding graphic objects
945 @cindex graphic objects, embedding
947 Various graphic objects may be added to a score, using markup
950 @cindex decorating text
952 @cindex text, framing
953 @cindex text, decorating
954 @cindex markup text, decorating
955 @cindex markup text, framing
961 @funindex \rounded-box
962 @funindex rounded-box
968 Some markup commands allow decoration of text elements with graphics,
969 as demonstrated in the following example.
971 @lilypond[quote,verbatim]
980 \bracket "1866 - 1925"
983 \rounded-box \bold Prelude
988 @cindex padding around text
990 @cindex markup text padding
992 @funindex \pad-markup
996 @funindex \pad-to-box
998 @funindex \pad-around
1001 Some commands may require an increase in the padding around the text;
1002 this is achieved with some markup commands exhaustively described in
1005 @lilypond[quote,verbatim]
1006 \markup \fill-line {
1008 \box "Charles Ives (1874 - 1954)"
1010 \box \pad-markup #2 "THE UNANSWERED QUESTION"
1011 \box \pad-x #8 "A Cosmic Landscape"
1018 \box \pad-to-box #'(-5 . 20) #'(0 . 5)
1019 \bold "Largo to Presto"
1022 "String quartet keeps very even time,
1023 Flute quartet keeps very uneven time."
1027 @cindex graphic notation
1028 @cindex symbols, non-musical
1029 @cindex non-musical symbols
1030 @cindex notation, graphic
1034 @funindex \draw-circle
1035 @funindex draw-circle
1036 @funindex \filled-box
1037 @funindex filled-box
1040 @funindex \draw-line
1042 @funindex \arrow-head
1043 @funindex arrow-head
1045 Other graphic elements or symbols may be printed without requiring any
1046 text. As with any markup expression, such objects can be combined.
1048 @lilypond[quote,verbatim]
1051 \draw-circle #4 #0.4 ##f
1052 \filled-box #'(-4 . 4) #'(-0.5 . 0.5) #1
1058 \draw-line #'(0 . 4)
1059 \arrow-head #Y #DOWN ##f
1064 @cindex embedded graphics
1065 @cindex images, embedding
1066 @cindex graphics, embedding
1071 @funindex \postscript
1072 @funindex postscript
1074 Advanced graphic features include the ability to include external
1075 image files converted to the Encapsulated PostScript format
1076 (@emph{eps}), or to directly embed graphics into the input file, using
1077 native PostScript code. In such a case, it may be useful to
1078 explicitely specify the size of the drawing, as demonstrated below:
1080 @lilypond[quote,verbatim,relative=1]
1083 \epsfile #X #10 #"./context-example.eps"
1084 \with-dimensions #'(0 . 6) #'(0 . 10)
1100 An exhaustive list of graphics-specific commands can be found in
1107 @ref{Editorial annotations}.
1112 Internals Reference:
1113 @rinternals{TextScript}.
1116 @file{scm/@/define@/-markup@/-commands@/.scm},
1117 @file{scm/@/stencil@/.scm}.
1120 @node Music notation inside markup
1121 @unnumberedsubsubsec Music notation inside markup
1123 @cindex notation inside markup
1124 @cindex music inside markup
1125 @cindex markup, music notation inside
1127 Various musical notation elements may be added to a score, inside a
1130 Notes and accidentals can be entered using markup commands:
1132 @lilypond[quote,verbatim,relative=2]
1136 \note-by-number #1 #1 #1.5
1139 \natural \semiflat \flat
1140 \sesquiflat \doubleflat
1144 \natural \semisharp \sharp
1145 \sesquisharp \doublesharp
1150 Other notation objects may also be printed
1153 @lilypond[quote,verbatim,relative=1]
1160 fis_\markup { \dynamic rf }
1171 More generally, any available musical symbol may be included
1172 separately in a markup object, as demonstrated below; an exhaustive
1173 list of these symbols and their names can be found in @ref{The Feta
1176 @lilypond[quote,verbatim,relative=2]
1178 c'^\markup { \musicglyph #"eight" }
1180 c,8._\markup { \musicglyph #"clefs.G_change" }
1182 c2^\markup { \musicglyph #"timesig.neomensural94" }
1185 Another way of printing non-text glyphs is described in @ref{Fonts
1186 explained}. This is useful for printing braces of various sizes.
1188 The markup mode also supports diagrams for specific
1191 @lilypond[quote,verbatim,relative=2]
1193 \fret-diagram-terse #"x;x;o;2;3;2;"
1196 \harp-pedal #"^-v|--ov^"
1201 \musicglyph #"accordion.accDiscant"
1203 \raise #0.5 \musicglyph #"accordion.accDot"
1204 \raise #1.5 \musicglyph #"accordion.accDot"
1208 @c The accordion diagram is actually taken from a snippet.
1211 Such diagrams are documented in @ref{Instrument Specific Markup}.
1213 @cindex score inside markup
1214 @cindex markup, score inside
1216 A whole score can even be nested inside a markup object. In such a
1217 case, the nested @code{\score} block must contain a @code{\layout}
1218 block, as demonstrated here:
1220 @lilypond[quote,verbatim,relative=1]
1223 \relative c' { c4 d e f }
1231 An exhaustive list of music notation related commands can be found in
1238 @ref{The Feta font},
1239 @ref{Fonts explained}.
1244 Internals Reference:
1245 @rinternals{TextScript}.
1248 @file{scm/@/define@/-markup@/-commands@/.scm},
1249 @file{scm/@/fret@/-diagrams@/.scm},
1250 @file{scm/@/harp@/-pedals@/.scm}.
1253 @node Multi-page markup
1254 @unnumberedsubsubsec Multi-page markup
1256 @cindex multi-page markup
1257 @cindex markup, multi-page
1258 @cindex markup text, multi-page
1259 @cindex text spread over multiple pages
1261 @funindex \markuplines
1262 @funindex markuplines
1263 @funindex \justified-lines
1264 @funindex justified-lines
1265 @funindex \wordwrap-lines
1266 @funindex wordwrap-lines
1268 Although standard markup objects are not breakable, a specific syntax
1269 makes it possible to enter lines of text that can spread over multiple
1272 @lilypond[quote,verbatim]
1275 A very long text of justified lines.
1279 Another very long paragraph.
1286 This syntax accepts a list of markups, that can be
1289 the result of a markup list command,
1293 a list of markup lists.
1296 An exhaustive list of markup list commands can be found in
1297 @ref{Text markup list commands}.
1302 @ref{Text markup list commands},
1308 @rextend{New markup list command definition}.
1310 Internals Reference:
1311 @rinternals{TextScript}.
1314 @file{scm/@/define@/-markup@/-commands@/.scm}.
1317 @funindex \markuplines
1318 @funindex markuplines
1321 @code{\markuplines}.
1328 This section presents the way fonts are handled, and how they may be
1333 * Single entry fonts::
1334 * Entire document fonts::
1337 @node Fonts explained
1338 @unnumberedsubsubsec Fonts explained
1341 @cindex fonts, explained
1342 @cindex braces, various sizes
1343 @cindex fonts, non-text in markup
1344 @cindex non-text fonts in markup
1346 @funindex font-interface
1348 Fonts are handled through several libraries. FontConfig is used to
1349 detect available fonts on the system; the selected fonts are rendered
1352 Music notation fonts can be described as a set of specific glyphs,
1353 ordered in several families. The following syntax allows various
1354 LilyPond @code{feta} non-text fonts to be used directly in markup
1357 @lilypond[quote,verbatim,relative=2]
1360 \override #'(font-encoding . fetaBraces)
1362 \override #'(font-encoding . fetaText)
1364 \override #'(font-encoding . fetaMusic)
1365 \lookup #"noteheads.s0petrucci"
1371 However, all these glyphs except the braces of various sizes contained
1372 in @code{fetaBraces} are available using the simpler syntax described
1373 in @ref{Music notation inside markup}.
1375 When using the glyphs contained in @code{fetaBraces}, the size of the
1376 brace is specified by the numerical part of the glyph name, in
1377 arbitrary units. Any integer from @code{0} to @code{575} inclusive
1378 may be specified, @code{0} giving the smallest brace. The optimum
1379 value must be determined by trial and error. These glyphs are all
1380 left braces; right braces may be obtained by rotation, see
1381 @ref{Rotating objects}.
1383 Three families of text fonts are made available: the @emph{roman}
1384 (serif) font, that defaults to New Century Schoolbook, the @emph{sans}
1385 font and the monospaced @emph{typewriter} font -- these last two
1386 families are determined by the Pango installation.
1388 Each family may include different shapes and series. The following
1389 example demonstrates the ability to select alternate families, shapes,
1390 series and sizes. The value supplied to @code{font-size} is the
1391 required change from the default size.
1393 @lilypond[quote,verbatim,relative=2]
1394 \override Score.RehearsalMark #'font-family = #'typewriter
1395 \mark \markup "Ouverture"
1396 \override Voice.TextScript #'font-shape = #'italic
1397 \override Voice.TextScript #'font-series = #'bold
1398 d2.^\markup "Allegro"
1399 \override Voice.TextScript #'font-size = #-3
1404 A similar syntax may be used in markup mode; however in this case it
1405 is preferable to use the simpler syntax explained in @ref{Selecting
1406 font and font size}:
1408 @lilypond[quote,verbatim]
1412 \override #'(font-shape . italic)
1413 \override #'(font-size . 4)
1417 \override #'(font-family . typewriter)
1419 \override #'(font-series . bold)
1423 \override #'(font-family . sans)
1430 Although it is easy to switch between preconfigured fonts, it is also
1431 possible to use other fonts, as explained in the following sections:
1432 @ref{Single entry fonts} and @ref{Entire document fonts}.
1437 @ref{The Feta font},
1438 @ref{Music notation inside markup},
1439 @ref{Selecting font and font size},
1443 @node Single entry fonts
1444 @unnumberedsubsubsec Single entry fonts
1446 Any font that is installed on the operating system and recognized by
1447 FontConfig may be used in a score, using the following syntax:
1449 @lilypond[quote,verbatim,relative=2]
1450 \override Staff.TimeSignature #'font-name = #"Bitstream Charter"
1451 \override Staff.TimeSignature #'font-size = #2
1455 \override #'(font-name . "Vera Bold")
1460 @cindex fonts, finding available
1461 @cindex finding available fonts
1462 @cindex listing available fonts
1463 @cindex available fonts, listing
1465 @funindex show-available-fonts
1467 The following command displays a list of all available fonts on the
1471 lilypond -dshow-available-fonts x
1477 @ref{Fonts explained},
1478 @ref{Entire document fonts}.
1483 @c A source file gets never installed...
1485 @c @file{lily/@/font@/-config@/-scheme@/.cc}.
1488 @node Entire document fonts
1489 @unnumberedsubsubsec Entire document fonts
1491 It is possible to change the fonts to be used as the default fonts in
1492 the @emph{roman}, @emph{sans} and @emph{typewriter} font families by
1493 specifying them, in that order, as shown in the example below. For an
1494 explanation of fonts, see @ref{Fonts explained}.
1496 @cindex font families, setting
1497 @cindex fonts, changing for entire document
1499 @funindex make-pango-font-tree
1501 @lilypond[verbatim,quote]
1505 (make-pango-font-tree "Times New Roman"
1508 (/ myStaffSize 20)))
1515 \typewriter typewriter. }
1519 @c we don't do Helvetica / Courier, since GS incorrectly loads
1525 @ref{Fonts explained},
1526 @ref{Single entry fonts},
1527 @ref{Selecting font and font size},