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}.
108 @cindex text outside margin
109 @cindex margin, text running over
110 @cindex text, keeping inside margin
111 @cindex lyrics, keeping inside margin
116 Checking to make sure that text scripts and lyrics are within the
117 margins is a relatively large computational task. To speed up
118 processing, LilyPond does not perform such calculations by
119 default; to enable it, use
122 \override Score.PaperColumn #'keep-inside-line = ##t
127 @unnumberedsubsubsec Text spanners
129 @cindex text spanners
131 Some performance indications, e.g., @notation{rallentando} or
132 @notation{accelerando}, are written as text and are extended over
133 multiple notes with dotted lines. Such objects, called @qq{spanners},
134 may be created from one note to another using the following syntax:
136 @lilypond[verbatim,quote,relative=2]
137 \override TextSpanner #'(bound-details left text) = "rit."
142 @cindex text spanners, formatting
143 @cindex formatting text spanners
146 The string to be printed is set through object properties. By default
147 it is printed in italic characters, but different formatting can be
148 obtained using @code{\markup} blocks, as described in @ref{Formatting
151 @lilypond[quote,relative=2,verbatim]
152 \override TextSpanner #'(bound-details left text) =
153 \markup { \upright "rit." }
158 The line style, as well as the text string, can be defined as an
159 object property. This syntax is described in @ref{Line styles}.
162 @funindex \textSpannerUp
163 @funindex textSpannerUp
164 @funindex \textSpannerDown
165 @funindex textSpannerDown
166 @funindex \textSpannerNeutral
167 @funindex textSpannerNeutral
171 @code{\textSpannerUp},
172 @code{\textSpannerDown},
173 @code{\textSpannerNeutral}.
186 @rinternals{TextSpanner}.
190 @unnumberedsubsubsec Text marks
195 @cindex text on bar line
196 @cindex coda on bar line
197 @cindex segno on bar line
198 @cindex fermata on bar line
199 @cindex bar lines, symbols on
206 Various text elements may be added to a score using
207 the syntax described in @ref{Rehearsal marks}:
209 @c \mark needs to be placed on a separate line (it's not
210 @c attached to an object like \markup is). -vv
212 @lilypond[verbatim,quote,relative=2]
218 This syntax makes it possible to put any text on a bar line;
219 more complex text formatting may be added using a @code{\markup}
220 block, as described in @ref{Formatting text}:
222 @lilypond[quote,verbatim,relative=1]
224 \mark \markup { \italic { colla parte } }
230 This syntax also allows to print special signs, like coda, segno
231 or fermata, by specifying the appropriate symbol name as explained in
232 @ref{Music notation inside markup}:
234 @lilypond[quote,verbatim,relative=2]
236 \mark \markup { \musicglyph #"scripts.ufermata" }
241 Such objects are only typeset above the top staff of the score; depending on
242 whether they are specified at the end or the middle of a bar, they
243 can be placed above the bar line or between notes. When specified at a
244 line break, the mark will be printed at the beginning of the next line.
246 @lilypond[quote,verbatim,relative=2]
256 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
257 {printing-marks-at-the-end-of-a-line-or-a-score.ly}
259 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
260 {aligning-marks-with-various-notation-objects.ly}
262 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
263 {printing-marks-on-every-staff.ly}
268 @ref{Rehearsal marks},
269 @ref{Formatting text},
270 @ref{Music notation inside markup},
277 @rinternals{RehearsalMark}.
281 @c To be removed when Issue 69 in the tracker gets fixed. -vv
283 If a mark is entered at the end of the last bar of the score (where
284 there is no next line), then the mark will not be printed at
288 @unnumberedsubsubsec Separate text
290 @cindex separate text
291 @cindex text, separate
292 @cindex standalone text
293 @cindex top-level text
294 @cindex text, top-level
295 @cindex text, standalone
300 A @code{\markup} block can exist by itself, outside of any
301 any @code{\score} block, as a @qq{top-level
302 expression}. This syntax is described in @ref{File structure}.
304 @lilypond[verbatim,quote]
306 Tomorrow, and tomorrow, and tomorrow...
311 This allows printing text separately from the music, which is
312 particularly useful when the input file contains several music pieces,
313 as described in @ref{Multiple scores in a book}.
315 @lilypond[quote,verbatim]
320 Tomorrow, and tomorrow, and tomorrow...
327 Separate text blocks can be spread over multiple pages,
328 making it possible to print text documents or books entirely
329 within LilyPond. This feature, and the specific syntax it
330 requires, are described in @ref{Multi-page markup}.
335 @funindex \markuplines
336 @funindex markuplines
346 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
347 {stand-alone-two-column-markup.ly}
350 Notation Reference: @ref{Formatting text},
351 @ref{File structure},
352 @ref{Multiple scores in a book},
353 @ref{Multi-page markup}.
358 Internals Reference: @rinternals{TextScript}.
361 @node Formatting text
362 @subsection Formatting text
364 This section presents basic and advanced text formatting,
365 using the @code{\markup} mode specific syntax.
368 * Text markup introduction::
369 * Selecting font and font size::
371 * Graphic notation inside markup::
372 * Music notation inside markup::
373 * Multi-page markup::
376 @node Text markup introduction
377 @unnumberedsubsubsec Text markup introduction
387 A @code{\markup} block is used to typeset text with an extensible
388 syntax called @qq{markup mode}.
390 @cindex markup expressions
391 @cindex expressions, markup
392 @cindex markup syntax
393 @cindex synatax, markup
395 The markup syntax is similar to LilyPond's usual syntax: a
396 @code{\markup} expression is enclosed in curly braces @code{@{
397 @dots{} @}}. A single word is regarded as a minimal expression,
398 and therefore does not need to be enclosed with braces.
400 Unlike simple @qq{quoted text} indications, @code{\markup} blocks may
401 contain nested expressions or markup commands, entered using the
402 backslash @code{\} character. Such commands only affect the first
403 following expression.
405 @lilypond[quote,verbatim,relative=2]
407 a2^\markup { poco \italic più forte }
409 d2_\markup { \italic "string. assai" }
411 b1^\markup { \bold { molto \italic agitato } }
415 @cindex special characters in markup mode
416 @cindex markup mode, special characters
417 @cindex reserved characters, printing
418 @cindex printing reserved characters
419 @cindex printing special characters
420 @cindex quoted text in markup mode
421 @cindex markup mode, quoted text
423 A @code{\markup} block may also contain quoted text strings. Such
424 strings are treated as minimal text expressions, and therefore any
425 markup command or special character (such as @code{\} and @code{#})
426 will be printed verbatim without affecting the formatting of the text.
427 Double quotation marks themselves may be printed by preceding them
430 @lilypond[quote,verbatim,relative=2]
431 a1^"\italic markup..."
432 a_\markup { \italic "... prints \"italic\" letters!" }
436 To be treated as a distinct expression, a list of words needs to be
437 enclosed with double quotes or preceded by a command. The way markup
438 expressions are defined affects how these expressions will be stacked,
439 centered and aligned; in the following example, the second
440 @code{\markup} expression is treated the same as the first one:
442 @lilypond[quote,verbatim,relative=2]
443 c1^\markup { \center-column { a bbb c } }
444 c1^\markup { \center-column { a { bbb c } } }
445 c1^\markup { \center-column { a \line { bbb c } } }
446 c1^\markup { \center-column { a "bbb c" } }
449 Markups can be stored in variables. Such variables may be
450 directly attached to notes:
452 @lilypond[quote,verbatim]
453 allegro = \markup { \bold \large Allegro }
463 An exhaustive list of @code{\markup}-specific commands can be found in
464 @ref{Text markup commands}.
469 @ref{Text markup commands}.
475 @file{scm/@/markup@/.scm}.
480 Syntax errors for markup mode can be confusing.
483 @node Selecting font and font size
484 @unnumberedsubsubsec Selecting font and font size
486 @cindex font switching
487 @cindex changing fonts
488 @cindex switching fonts
497 Basic font switching is supported in markup mode:
499 @lilypond[quote,verbatim,relative=2]
502 \italic { non troppo \underline Vivo }
505 d,_\markup { \italic quasi \smallCaps Tromba }
521 The size of the characters can also be altered in different ways:
524 the font size can be set to predefined standard sizes,
527 the font size can be set to an absolute value,
530 the font size can also be changed relatively to its previous value.
534 The following example demonstrates these three methods:
536 @lilypond[quote,verbatim,relative=1]
543 \fontsize #5 Sinfonia
550 \magnify #0.6 { e sentimento } )
563 Text may be printed as subscript or superscript. By default these are
564 printed in a smaller size, but a normal size can be used as well:
566 @lilypond[quote,verbatim]
569 \line { 1 \super st movement }
570 \line { 1 \normal-size-super st movement
571 \sub { (part two) } }
576 @cindex font families
578 The markup mode provides an easy way to select alternate font
579 families. The default serif font, of roman type, is automatically
580 selected unless specified otherwise; on the last line of the following
581 example, there is no difference between the first and the second word.
583 @lilypond[quote,verbatim]
586 \line { Act \number 1 }
587 \line { \sans { Scene I. } }
588 \line { \typewriter { Verona. An open place. } }
589 \line { Enter \roman Valentine and Proteus. }
595 Some of these font families, used for specific items such as numbers
596 or dynamics, do not provide all characters, as mentioned in @ref{New
597 dynamic marks} and @ref{Manual repeat marks}.
599 @c \concat is actually documented in Align (it is not
600 @c a font-switching command). But we need it here. -vv
602 When used inside a word, some font-switching or formatting commands
603 may produce an unwanted blank space. This can easily be solved by
604 concatenating the text elements together:
606 @lilypond[quote,verbatim]
610 \concat { 1 \super st }
614 \concat { \dynamic p , }
615 \italic { con dolce espressione }
621 An exhaustive list of font switching commands and custom font usage
622 commands can be found in @ref{Font}.
624 Defining custom font sets is also possible, as explained in
633 @funindex \normalsize
660 @ref{New dynamic marks},
661 @ref{Manual repeat marks},
668 @rinternals{TextScript}.
671 @file{scm/@/define@/-markup@/-commands@/.scm}.
675 @unnumberedsubsubsec Text alignment
677 @cindex text, aligning
678 @cindex aligning text
679 @cindex aligning markup text
680 @cindex aligning markups
681 @cindex markups, aligning
682 @cindex markup text, aligning
684 This subsection discusses how to place text in markup mode. Markup
685 objects can also be moved as a whole, using the syntax described in
686 @rlearning{Moving objects}.
688 @c Padding commands should be mentioned on this page, but
689 @c most of these require \box to be more clearly illustrated. -vv
691 @cindex text, horizontal alignment
692 @cindex horizontal text alignment
694 @funindex \left-align
696 @funindex \center-align
697 @funindex center-align
698 @funindex \right-align
699 @funindex right-align
701 Markup objects may be aligned in different ways. By default, a text
702 indication is aligned on its left edge: in the following example,
703 there is no difference between the first and the second markup.
705 @lilypond[quote,verbatim,relative=2]
708 d-\markup { \left-align poco }
710 d-\markup { \center-align { poco } }
712 d-\markup { \right-align poco }
718 Horizontal alignment may be fine-tuned using a numeric value:
720 @lilypond[quote,verbatim,relative=2]
721 a1-\markup { \halign #-1 poco }
723 a,-\markup { \halign #0 poco }
725 a,-\markup { \halign #0.5 poco }
727 a,-\markup { \halign #2 poco }
731 Some objects may have alignment procedures of their own, and therefore
732 are not affected by these commands. It is possible to move such
733 markup objects as a whole, as shown for instance in @ref{Text marks}.
735 @cindex text, vertical alignment
736 @cindex vertical text alignment
745 @c QUERY Should the function of ``\null'' be clarified? rp
747 Vertical alignment is a bit more complex. As stated above, markup
748 objects can be moved as a whole; however, it is also possible to move
749 specific elements inside a markup block. In this case, the element to
750 be moved needs to be preceded with an @emph{anchor point}, that can be
751 another markup element or an invisible object. The following example
752 demonstrates these two possibilities; the last markup in this example
753 has no anchor point, and therefore is not moved.
755 @lilypond[quote,verbatim,relative=1]
758 \raise #2 { Scène 1 }
763 \lower #4 \bold { Très modéré }
767 \raise #4 \italic { Une forêt. }
772 @funindex \general-align
773 @funindex general-align
776 @funindex \translate-scaled
777 @funindex translate-scaled
779 Some commands can affect both the horizontal and vertical alignment of
780 text objects in markup mode. Any object affected by these commands
781 must be preceded with an anchor point:
783 @lilypond[quote,verbatim,relative=1]
786 \translate #'(-1 . 2) "Scène 1"
791 \general-align #Y #3.2 \bold "Très modéré"
796 \translate-scaled #'(-1 . 2) \teeny "Une forêt."
801 @cindex multi-line markup
802 @cindex markup, multi-line
803 @cindex multi-line text
804 @cindex text, multi-line
805 @cindex text in columns
806 @cindex columns, text
810 @funindex \center-column
811 @funindex center-column
813 A markup object may include several lines of text. In the following
814 example, each element or expression is placed on its own line, either
815 left-aligned or centered:
817 @lilypond[quote,verbatim]
833 @cindex centering text on the page
834 @cindex text, centering on the page
835 @cindex markup, centering on the page
840 Similarly, a list of elements or expressions may be spread to fill the
841 entire horizontal line width (if there is only one element, it will be
842 centered on the page). These expressions can, in turn, include
843 multi-line text or any other markup expression:
845 @lilypond[quote,verbatim]
848 \line { William S. Gilbert }
850 \huge \smallCaps "The Mikado"
852 \smallCaps "The Town of Titipu"
854 \line { Sir Arthur Sullivan }
862 @cindex wordwrapped text
863 @cindex justified text
864 @cindex text, justified
865 @cindex text, wordwrapped
866 @cindex markup text, wordwrapped
867 @cindex markup text, justified
874 Long text indications can also be automatically wrapped accordingly to
875 the given line width. These will be either left-aligned or justified,
876 as shown in the following example.
878 @lilypond[quote,verbatim]
881 \line \smallCaps { La vida breve }
882 \line \bold { Acto I }
884 (La escena representa el corral de una casa de
885 gitanos en el AlbaicÃn de Granada. Al fondo una
886 puerta por la que se ve el negro interior de
887 una Fragua, iluminado por los rojos resplandores
892 \line \bold { Acto II }
893 \override #'(line-width . 50)
895 (Calle de Granada. Fachada de la casa de Carmela
896 y su hermano Manuel con grandes ventanas abiertas
897 a través de las que se ve el patio
898 donde se celebra una alegre fiesta)
904 @cindex text alignment commands
905 @cindex markup text alignment commands
906 @cindex alignment, text, commands
908 An exhaustive list of text alignment commands can be found in
914 @rlearning{Moving objects}.
923 Internals Reference: @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: @rinternals{TextScript}.
1106 @file{scm/@/define@/-markup@/-commands@/.scm},
1107 @file{scm/@/stencil@/.scm}.
1110 @node Music notation inside markup
1111 @unnumberedsubsubsec Music notation inside markup
1113 @cindex notation inside markup
1114 @cindex music inside markup
1115 @cindex markup, music notation inside
1117 Various musical notation elements may be added to a score, inside a
1120 Notes and accidentals can be entered using markup commands:
1122 @lilypond[quote,verbatim,relative=2]
1126 \note-by-number #1 #1 #1.5
1129 \natural \semiflat \flat
1130 \sesquiflat \doubleflat
1134 \natural \semisharp \sharp
1135 \sesquisharp \doublesharp
1140 Other notation objects may also be printed
1143 @lilypond[quote,verbatim,relative=1]
1150 fis_\markup { \dynamic rf }
1161 More generally, any available musical symbol may be included
1162 separately in a markup object, as demonstrated below; an exhaustive
1163 list of these symbols and their names can be found in @ref{The Feta
1166 @lilypond[quote,verbatim,relative=2]
1168 c'^\markup { \musicglyph #"eight" }
1170 c,8._\markup { \musicglyph #"clefs.G_change" }
1172 c2^\markup { \musicglyph #"timesig.neomensural94" }
1175 Another way of printing non-text glyphs is described in @ref{Fonts
1176 explained}. This is useful for printing braces of various sizes.
1178 The markup mode also supports diagrams for specific
1181 @lilypond[quote,verbatim,relative=2]
1183 \fret-diagram-terse #"x;x;o;2;3;2;"
1186 \harp-pedal #"^-v|--ov^"
1191 \musicglyph #"accordion.accDiscant"
1193 \raise #0.5 \musicglyph #"accordion.accDot"
1194 \raise #1.5 \musicglyph #"accordion.accDot"
1198 @c The accordion diagram is actually taken from a snippet.
1201 Such diagrams are documented in @ref{Instrument Specific Markup}.
1203 @cindex score inside markup
1204 @cindex markup, score inside
1206 A whole score can even be nested inside a markup object. In such a
1207 case, the nested @code{\score} block must contain a @code{\layout}
1208 block, as demonstrated here:
1210 @lilypond[quote,verbatim,relative=1]
1213 \relative c' { c4 d e f }
1221 An exhaustive list of music notation related commands can be found in
1228 @ref{The Feta font},
1229 @ref{Fonts explained}.
1234 Internals Reference: @rinternals{TextScript}.
1237 @file{scm/@/define@/-markup@/-commands@/.scm},
1238 @file{scm/@/fret@/-diagrams@/.scm},
1239 @file{scm/@/harp@/-pedals@/.scm}.
1242 @node Multi-page markup
1243 @unnumberedsubsubsec Multi-page markup
1245 @cindex multi-page markup
1246 @cindex markup, multi-page
1247 @cindex markup text, multi-page
1248 @cindex text spread over multiple pages
1250 @funindex \markuplines
1251 @funindex markuplines
1252 @funindex \justified-lines
1253 @funindex justified-lines
1254 @funindex \wordwrap-lines
1255 @funindex wordwrap-lines
1257 Although standard markup objects are not breakable, a specific syntax
1258 makes it possible to enter lines of text that can spread over multiple
1261 @lilypond[quote,verbatim]
1264 A very long text of justified lines.
1268 Another very long paragraph.
1275 This syntax accepts a list of markups, that can be
1278 the result of a markup list command,
1282 a list of markup lists.
1285 An exhaustive list of markup list commands can be found in
1286 @ref{Text markup list commands}.
1291 @ref{Text markup list commands},
1292 @ref{New markup list command definition}.
1297 Internals Reference: @rinternals{TextScript}.
1300 @file{scm/@/define@/-markup@/-commands@/.scm}.
1302 @funindex \markuplines
1303 @funindex markuplines
1306 @code{\markuplines}.
1313 This section presents the way fonts are handled, and how they may be
1318 * Single entry fonts::
1319 * Entire document fonts::
1322 @node Fonts explained
1323 @unnumberedsubsubsec Fonts explained
1326 @cindex fonts, explained
1327 @cindex braces, various sizes
1328 @cindex fonts, non-text in markup
1329 @cindex non-text fonts in markup
1331 @funindex font-interface
1333 Fonts are handled through several libraries. FontConfig is used to
1334 detect available fonts on the system; the selected fonts are rendered
1337 Music notation fonts can be described as a set of specific glyphs,
1338 ordered in several families. The following syntax allows various
1339 LilyPond @code{feta} non-text fonts to be used directly in markup
1342 @lilypond[quote,verbatim,relative=2]
1345 \override #'(font-encoding . fetaBraces)
1347 \override #'(font-encoding . fetaNumber)
1349 \override #'(font-encoding . fetaDynamic)
1351 \override #'(font-encoding . fetaMusic)
1352 \lookup #"noteheads.s0petrucci"
1358 However, all these glyphs except the braces of various sizes contained
1359 in @code{fetaBraces} are available using the simpler syntax described
1360 in @ref{Music notation inside markup}.
1362 When using the glyphs contained in @code{fetaBraces}, the size of the
1363 brace is specified by the numerical part of the glyph name, in
1364 arbitrary units. Any integer from @code{0} to @code{575} inclusive
1365 may be specified, @code{0} giving the smallest brace. The optimum
1366 value must be determined by trial and error. These glyphs are all
1367 left braces; right braces may be obtained by rotation, see
1368 @ref{Rotating objects}.
1370 Three families of text fonts are made available: the @emph{roman}
1371 (serif) font, that defaults to New Century Schoolbook, the @emph{sans}
1372 font and the monospaced @emph{typewriter} font -- these last two
1373 families are determined by the Pango installation.
1375 Each family may include different shapes and series. The following
1376 example demonstrates the ability to select alternate families, shapes,
1377 series and sizes. The value supplied to @code{font-size} is the
1378 required change from the default size.
1380 @lilypond[quote,verbatim,relative=2]
1381 \override Score.RehearsalMark #'font-family = #'typewriter
1382 \mark \markup "Ouverture"
1383 \override Voice.TextScript #'font-shape = #'italic
1384 \override Voice.TextScript #'font-series = #'bold
1385 d2.^\markup "Allegro"
1386 \override Voice.TextScript #'font-size = #-3
1391 A similar syntax may be used in markup mode; however in this case it
1392 is preferable to use the simpler syntax explained in @ref{Selecting
1393 font and font size}:
1395 @lilypond[quote,verbatim]
1399 \override #'(font-shape . italic)
1400 \override #'(font-size . 4)
1404 \override #'(font-family . typewriter)
1406 \override #'(font-series . bold)
1410 \override #'(font-family . sans)
1417 Although it is easy to switch between preconfigured fonts, it is also
1418 possible to use other fonts, as explained in the following sections:
1419 @ref{Single entry fonts} and @ref{Entire document fonts}.
1424 @ref{The Feta font},
1425 @ref{Music notation inside markup},
1426 @ref{Selecting font and font size},
1430 @node Single entry fonts
1431 @unnumberedsubsubsec Single entry fonts
1433 Any font that is installed on the operating system and recognized by
1434 FontConfig may be used in a score, using the following syntax:
1436 @lilypond[quote,verbatim,relative=2]
1437 \override Staff.TimeSignature #'font-name = #"Charter"
1438 \override Staff.TimeSignature #'font-size = #2
1442 \override #'(font-name . "Vera Bold")
1447 @cindex fonts, finding available
1448 @cindex finding available fonts
1449 @cindex listing available fonts
1450 @cindex available fonts, listing
1452 @funindex show-available-fonts
1454 The following command displays a list of all available fonts on the
1458 lilypond -dshow-available-fonts x
1464 @ref{Fonts explained},
1465 @ref{Entire document fonts}.
1470 @c A source file gets never installed...
1472 @c @file{lily/@/font@/-config@/-scheme@/.cc}.
1475 @node Entire document fonts
1476 @unnumberedsubsubsec Entire document fonts
1478 It is possible to change the fonts to be used as the default fonts in
1479 the @emph{roman}, @emph{sans} and @emph{typewriter} font families by
1480 specifying them, in that order, as shown in the example below. For an
1481 explanation of fonts, see @ref{Fonts explained}.
1483 @cindex font families, setting
1484 @cindex fonts, changing for entire document
1486 @funindex make-pango-font-tree
1488 @lilypond[verbatim,quote]
1492 (make-pango-font-tree "Times New Roman"
1495 (/ myStaffSize 20)))
1502 \typewriter typewriter. }
1506 @c we don't do Helvetica / Courier, since GS incorrectly loads
1512 @ref{Fonts explained},
1513 @ref{Single entry fonts},
1514 @ref{Selecting font and font size},