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-or-a-score.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{RehearsalMark}.
282 @c To be removed when Issue 69 in the tracker gets fixed. -vv
284 If a mark is entered at the end of the last bar of the score (where
285 there is no next line), then the mark will not be printed at
289 @unnumberedsubsubsec Separate text
291 @cindex separate text
292 @cindex text, separate
293 @cindex standalone text
294 @cindex top-level text
295 @cindex text, top-level
296 @cindex text, standalone
301 A @code{\markup} block can exist by itself, outside of any
302 any @code{\score} block, as a @qq{top-level
303 expression}. This syntax is described in @ref{File structure}.
305 @lilypond[verbatim,quote]
307 Tomorrow, and tomorrow, and tomorrow...
312 This allows printing text separately from the music, which is
313 particularly useful when the input file contains several music pieces,
314 as described in @ref{Multiple scores in a book}.
316 @lilypond[quote,verbatim]
321 Tomorrow, and tomorrow, and tomorrow...
328 Separate text blocks can be spread over multiple pages,
329 making it possible to print text documents or books entirely
330 within LilyPond. This feature, and the specific syntax it
331 requires, are described in @ref{Multi-page markup}.
336 @funindex \markuplines
337 @funindex markuplines
347 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
348 {stand-alone-two-column-markup.ly}
353 @ref{Formatting text},
354 @ref{File structure},
355 @ref{Multiple scores in a book},
356 @ref{Multi-page markup}.
362 @rinternals{TextScript}.
365 @node Formatting text
366 @subsection Formatting text
368 This section presents basic and advanced text formatting,
369 using the @code{\markup} mode specific syntax.
372 * Text markup introduction::
373 * Selecting font and font size::
375 * Graphic notation inside markup::
376 * Music notation inside markup::
377 * Multi-page markup::
380 @node Text markup introduction
381 @unnumberedsubsubsec Text markup introduction
391 A @code{\markup} block is used to typeset text with an extensible
392 syntax called @qq{markup mode}.
394 @cindex markup expressions
395 @cindex expressions, markup
396 @cindex markup syntax
397 @cindex synatax, markup
399 The markup syntax is similar to LilyPond's usual syntax: a
400 @code{\markup} expression is enclosed in curly braces @code{@{
401 @dots{} @}}. A single word is regarded as a minimal expression,
402 and therefore does not need to be enclosed with braces.
404 Unlike simple @qq{quoted text} indications, @code{\markup} blocks may
405 contain nested expressions or markup commands, entered using the
406 backslash @code{\} character. Such commands only affect the first
407 following expression.
409 @lilypond[quote,verbatim,relative=2]
411 a2^\markup { poco \italic più forte }
413 d2_\markup { \italic "string. assai" }
415 b1^\markup { \bold { molto \italic agitato } }
419 @cindex special characters in markup mode
420 @cindex markup mode, special characters
421 @cindex reserved characters, printing
422 @cindex printing reserved characters
423 @cindex printing special characters
424 @cindex quoted text in markup mode
425 @cindex markup mode, quoted text
427 A @code{\markup} block may also contain quoted text strings. Such
428 strings are treated as minimal text expressions, and therefore any
429 markup command or special character (such as @code{\} and @code{#})
430 will be printed verbatim without affecting the formatting of the text.
431 Double quotation marks themselves may be printed by preceding them
434 @lilypond[quote,verbatim,relative=2]
435 a1^"\italic markup..."
436 a_\markup { \italic "... prints \"italic\" letters!" }
440 To be treated as a distinct expression, a list of words needs to be
441 enclosed with double quotes or preceded by a command. The way markup
442 expressions are defined affects how these expressions will be stacked,
443 centered and aligned; in the following example, the second
444 @code{\markup} expression is treated the same as the first one:
446 @lilypond[quote,verbatim,relative=2]
447 c1^\markup { \center-column { a bbb c } }
448 c1^\markup { \center-column { a { bbb c } } }
449 c1^\markup { \center-column { a \line { bbb c } } }
450 c1^\markup { \center-column { a "bbb c" } }
453 Markups can be stored in variables. Such variables may be
454 directly attached to notes:
456 @lilypond[quote,verbatim]
457 allegro = \markup { \bold \large Allegro }
467 An exhaustive list of @code{\markup}-specific commands can be found in
468 @ref{Text markup commands}.
473 @ref{Text markup commands}.
479 @file{scm/@/markup@/.scm}.
484 Syntax errors for markup mode can be confusing.
487 @node Selecting font and font size
488 @unnumberedsubsubsec Selecting font and font size
490 @cindex font switching
491 @cindex changing fonts
492 @cindex switching fonts
501 Basic font switching is supported in markup mode:
503 @lilypond[quote,verbatim,relative=2]
506 \italic { non troppo \underline Vivo }
509 d,_\markup { \italic quasi \smallCaps Tromba }
525 The size of the characters can also be altered in different ways:
528 the font size can be set to predefined standard sizes,
531 the font size can be set to an absolute value,
534 the font size can also be changed relatively to its previous value.
538 The following example demonstrates these three methods:
540 @lilypond[quote,verbatim,relative=1]
547 \fontsize #5 Sinfonia
554 \magnify #0.6 { e sentimento } )
567 Text may be printed as subscript or superscript. By default these are
568 printed in a smaller size, but a normal size can be used as well:
570 @lilypond[quote,verbatim]
573 \line { 1 \super st movement }
574 \line { 1 \normal-size-super st movement
575 \sub { (part two) } }
580 @cindex font families
582 The markup mode provides an easy way to select alternate font
583 families. The default serif font, of roman type, is automatically
584 selected unless specified otherwise; on the last line of the following
585 example, there is no difference between the first and the second word.
587 @lilypond[quote,verbatim]
590 \line { Act \number 1 }
591 \line { \sans { Scene I. } }
592 \line { \typewriter { Verona. An open place. } }
593 \line { Enter \roman Valentine and Proteus. }
599 Some of these font families, used for specific items such as numbers
600 or dynamics, do not provide all characters, as mentioned in @ref{New
601 dynamic marks} and @ref{Manual repeat marks}.
603 @c \concat is actually documented in Align (it is not
604 @c a font-switching command). But we need it here. -vv
606 When used inside a word, some font-switching or formatting commands
607 may produce an unwanted blank space. This can easily be solved by
608 concatenating the text elements together:
610 @lilypond[quote,verbatim]
614 \concat { 1 \super st }
618 \concat { \dynamic p , }
619 \italic { con dolce espressione }
625 An exhaustive list of font switching commands and custom font usage
626 commands can be found in @ref{Font}.
628 Defining custom font sets is also possible, as explained in
637 @funindex \normalsize
664 @ref{New dynamic marks},
665 @ref{Manual repeat marks},
672 @rinternals{TextScript}.
675 @file{scm/@/define@/-markup@/-commands@/.scm}.
679 @unnumberedsubsubsec Text alignment
681 @cindex text, aligning
682 @cindex aligning text
683 @cindex aligning markup text
684 @cindex aligning markups
685 @cindex markups, aligning
686 @cindex markup text, aligning
688 This subsection discusses how to place text in markup mode. Markup
689 objects can also be moved as a whole, using the syntax described in
690 @rlearning{Moving objects}.
692 @c Padding commands should be mentioned on this page, but
693 @c most of these require \box to be more clearly illustrated. -vv
695 @cindex text, horizontal alignment
696 @cindex horizontal text alignment
698 @funindex \left-align
700 @funindex \center-align
701 @funindex center-align
702 @funindex \right-align
703 @funindex right-align
705 Markup objects may be aligned in different ways. By default, a text
706 indication is aligned on its left edge: in the following example,
707 there is no difference between the first and the second markup.
709 @lilypond[quote,verbatim,relative=2]
712 d-\markup { \left-align poco }
714 d-\markup { \center-align { poco } }
716 d-\markup { \right-align poco }
722 Horizontal alignment may be fine-tuned using a numeric value:
724 @lilypond[quote,verbatim,relative=2]
725 a1-\markup { \halign #-1 poco }
727 a,-\markup { \halign #0 poco }
729 a,-\markup { \halign #0.5 poco }
731 a,-\markup { \halign #2 poco }
735 Some objects may have alignment procedures of their own, and therefore
736 are not affected by these commands. It is possible to move such
737 markup objects as a whole, as shown for instance in @ref{Text marks}.
739 @cindex text, vertical alignment
740 @cindex vertical text alignment
749 @c QUERY Should the function of ``\null'' be clarified? rp
751 Vertical alignment is a bit more complex. As stated above, markup
752 objects can be moved as a whole; however, it is also possible to move
753 specific elements inside a markup block. In this case, the element to
754 be moved needs to be preceded with an @emph{anchor point}, that can be
755 another markup element or an invisible object. The following example
756 demonstrates these two possibilities; the last markup in this example
757 has no anchor point, and therefore is not moved.
759 @lilypond[quote,verbatim,relative=1]
762 \raise #2 { Scène 1 }
767 \lower #4 \bold { Très modéré }
771 \raise #4 \italic { Une forêt. }
776 @funindex \general-align
777 @funindex general-align
780 @funindex \translate-scaled
781 @funindex translate-scaled
783 Some commands can affect both the horizontal and vertical alignment of
784 text objects in markup mode. Any object affected by these commands
785 must be preceded with an anchor point:
787 @lilypond[quote,verbatim,relative=1]
790 \translate #'(-1 . 2) "Scène 1"
795 \general-align #Y #3.2 \bold "Très modéré"
800 \translate-scaled #'(-1 . 2) \teeny "Une forêt."
805 @cindex multi-line markup
806 @cindex markup, multi-line
807 @cindex multi-line text
808 @cindex text, multi-line
809 @cindex text in columns
810 @cindex columns, text
814 @funindex \center-column
815 @funindex center-column
817 A markup object may include several lines of text. In the following
818 example, each element or expression is placed on its own line, either
819 left-aligned or centered:
821 @lilypond[quote,verbatim]
837 @cindex centering text on the page
838 @cindex text, centering on the page
839 @cindex markup, centering on the page
844 Similarly, a list of elements or expressions may be spread to fill the
845 entire horizontal line width (if there is only one element, it will be
846 centered on the page). These expressions can, in turn, include
847 multi-line text or any other markup expression:
849 @lilypond[quote,verbatim]
852 \line { William S. Gilbert }
854 \huge \smallCaps "The Mikado"
856 \smallCaps "The Town of Titipu"
858 \line { Sir Arthur Sullivan }
866 @cindex wordwrapped text
867 @cindex justified text
868 @cindex text, justified
869 @cindex text, wordwrapped
870 @cindex markup text, wordwrapped
871 @cindex markup text, justified
878 Long text indications can also be automatically wrapped accordingly to
879 the given line width. These will be either left-aligned or justified,
880 as shown in the following example.
882 @lilypond[quote,verbatim]
885 \line \smallCaps { La vida breve }
886 \line \bold { Acto I }
888 (La escena representa el corral de una casa de
889 gitanos en el AlbaicÃn de Granada. Al fondo una
890 puerta por la que se ve el negro interior de
891 una Fragua, iluminado por los rojos resplandores
896 \line \bold { Acto II }
897 \override #'(line-width . 50)
899 (Calle de Granada. Fachada de la casa de Carmela
900 y su hermano Manuel con grandes ventanas abiertas
901 a través de las que se ve el patio
902 donde se celebra una alegre fiesta)
908 @cindex text alignment commands
909 @cindex markup text alignment commands
910 @cindex alignment, text, commands
912 An exhaustive list of text alignment commands can be found in
918 @rlearning{Moving objects}.
928 @rinternals{TextScript}.
931 @file{scm/@/define@/-markup@/-commands@/.scm}.
934 @node Graphic notation inside markup
935 @unnumberedsubsubsec Graphic notation inside markup
937 @cindex graphics, embedding
938 @cindex drawing graphic objects
939 @cindex graphic objects, drawing
940 @cindex embedding graphic objects
941 @cindex graphic objects, embedding
943 Various graphic objects may be added to a score, using markup
946 @cindex decorating text
948 @cindex text, framing
949 @cindex text, decorating
950 @cindex markup text, decorating
951 @cindex markup text, framing
957 @funindex \rounded-box
958 @funindex rounded-box
964 Some markup commands allow decoration of text elements with graphics,
965 as demonstrated in the following example.
967 @lilypond[quote,verbatim]
976 \bracket "1866 - 1925"
979 \rounded-box \bold Prelude
984 @cindex padding around text
986 @cindex markup text padding
988 @funindex \pad-markup
992 @funindex \pad-to-box
994 @funindex \pad-around
997 Some commands may require an increase in the padding around the text;
998 this is achieved with some markup commands exhaustively described in
1001 @lilypond[quote,verbatim]
1002 \markup \fill-line {
1004 \box "Charles Ives (1874 - 1954)"
1006 \box \pad-markup #2 "THE UNANSWERED QUESTION"
1007 \box \pad-x #8 "A Cosmic Landscape"
1014 \box \pad-to-box #'(-5 . 20) #'(0 . 5)
1015 \bold "Largo to Presto"
1018 "String quartet keeps very even time,
1019 Flute quartet keeps very uneven time."
1023 @cindex graphic notation
1024 @cindex symbols, non-musical
1025 @cindex non-musical symbols
1026 @cindex notation, graphic
1030 @funindex \draw-circle
1031 @funindex draw-circle
1032 @funindex \filled-box
1033 @funindex filled-box
1036 @funindex \draw-line
1038 @funindex \arrow-head
1039 @funindex arrow-head
1041 Other graphic elements or symbols may be printed without requiring any
1042 text. As with any markup expression, such objects can be combined.
1044 @lilypond[quote,verbatim]
1047 \draw-circle #4 #0.4 ##f
1048 \filled-box #'(-4 . 4) #'(-0.5 . 0.5) #1
1054 \draw-line #'(0 . 4)
1055 \arrow-head #Y #DOWN ##f
1060 @cindex embedded graphics
1061 @cindex images, embedding
1062 @cindex graphics, embedding
1067 @funindex \postscript
1068 @funindex postscript
1070 Advanced graphic features include the ability to include external
1071 image files converted to the Encapsulated PostScript format
1072 (@emph{eps}), or to directly embed graphics into the input file, using
1073 native PostScript code. In such a case, it may be useful to
1074 explicitely specify the size of the drawing, as demonstrated below:
1076 @lilypond[quote,verbatim,relative=1]
1079 \epsfile #X #10 #"./context-example.eps"
1080 \with-dimensions #'(0 . 6) #'(0 . 10)
1096 An exhaustive list of graphics-specific commands can be found in
1103 @ref{Editorial annotations}.
1108 Internals Reference:
1109 @rinternals{TextScript}.
1112 @file{scm/@/define@/-markup@/-commands@/.scm},
1113 @file{scm/@/stencil@/.scm}.
1116 @node Music notation inside markup
1117 @unnumberedsubsubsec Music notation inside markup
1119 @cindex notation inside markup
1120 @cindex music inside markup
1121 @cindex markup, music notation inside
1123 Various musical notation elements may be added to a score, inside a
1126 Notes and accidentals can be entered using markup commands:
1128 @lilypond[quote,verbatim,relative=2]
1132 \note-by-number #1 #1 #1.5
1135 \natural \semiflat \flat
1136 \sesquiflat \doubleflat
1140 \natural \semisharp \sharp
1141 \sesquisharp \doublesharp
1146 Other notation objects may also be printed
1149 @lilypond[quote,verbatim,relative=1]
1156 fis_\markup { \dynamic rf }
1167 More generally, any available musical symbol may be included
1168 separately in a markup object, as demonstrated below; an exhaustive
1169 list of these symbols and their names can be found in @ref{The Feta
1172 @lilypond[quote,verbatim,relative=2]
1174 c'^\markup { \musicglyph #"eight" }
1176 c,8._\markup { \musicglyph #"clefs.G_change" }
1178 c2^\markup { \musicglyph #"timesig.neomensural94" }
1181 Another way of printing non-text glyphs is described in @ref{Fonts
1182 explained}. This is useful for printing braces of various sizes.
1184 The markup mode also supports diagrams for specific
1187 @lilypond[quote,verbatim,relative=2]
1189 \fret-diagram-terse #"x;x;o;2;3;2;"
1192 \harp-pedal #"^-v|--ov^"
1197 \musicglyph #"accordion.accDiscant"
1199 \raise #0.5 \musicglyph #"accordion.accDot"
1200 \raise #1.5 \musicglyph #"accordion.accDot"
1204 @c The accordion diagram is actually taken from a snippet.
1207 Such diagrams are documented in @ref{Instrument Specific Markup}.
1209 @cindex score inside markup
1210 @cindex markup, score inside
1212 A whole score can even be nested inside a markup object. In such a
1213 case, the nested @code{\score} block must contain a @code{\layout}
1214 block, as demonstrated here:
1216 @lilypond[quote,verbatim,relative=1]
1219 \relative c' { c4 d e f }
1227 An exhaustive list of music notation related commands can be found in
1234 @ref{The Feta font},
1235 @ref{Fonts explained}.
1240 Internals Reference:
1241 @rinternals{TextScript}.
1244 @file{scm/@/define@/-markup@/-commands@/.scm},
1245 @file{scm/@/fret@/-diagrams@/.scm},
1246 @file{scm/@/harp@/-pedals@/.scm}.
1249 @node Multi-page markup
1250 @unnumberedsubsubsec Multi-page markup
1252 @cindex multi-page markup
1253 @cindex markup, multi-page
1254 @cindex markup text, multi-page
1255 @cindex text spread over multiple pages
1257 @funindex \markuplines
1258 @funindex markuplines
1259 @funindex \justified-lines
1260 @funindex justified-lines
1261 @funindex \wordwrap-lines
1262 @funindex wordwrap-lines
1264 Although standard markup objects are not breakable, a specific syntax
1265 makes it possible to enter lines of text that can spread over multiple
1268 @lilypond[quote,verbatim]
1271 A very long text of justified lines.
1275 Another very long paragraph.
1282 This syntax accepts a list of markups, that can be
1285 the result of a markup list command,
1289 a list of markup lists.
1292 An exhaustive list of markup list commands can be found in
1293 @ref{Text markup list commands}.
1298 @ref{Text markup list commands},
1304 @rextend{New markup list command definition}.
1306 Internals Reference:
1307 @rinternals{TextScript}.
1310 @file{scm/@/define@/-markup@/-commands@/.scm}.
1313 @funindex \markuplines
1314 @funindex markuplines
1317 @code{\markuplines}.
1324 This section presents the way fonts are handled, and how they may be
1329 * Single entry fonts::
1330 * Entire document fonts::
1333 @node Fonts explained
1334 @unnumberedsubsubsec Fonts explained
1337 @cindex fonts, explained
1338 @cindex braces, various sizes
1339 @cindex fonts, non-text in markup
1340 @cindex non-text fonts in markup
1342 @funindex font-interface
1344 Fonts are handled through several libraries. FontConfig is used to
1345 detect available fonts on the system; the selected fonts are rendered
1348 Music notation fonts can be described as a set of specific glyphs,
1349 ordered in several families. The following syntax allows various
1350 LilyPond @code{feta} non-text fonts to be used directly in markup
1353 @lilypond[quote,verbatim,relative=2]
1356 \override #'(font-encoding . fetaBraces)
1358 \override #'(font-encoding . fetaNumber)
1360 \override #'(font-encoding . fetaDynamic)
1362 \override #'(font-encoding . fetaMusic)
1363 \lookup #"noteheads.s0petrucci"
1369 However, all these glyphs except the braces of various sizes contained
1370 in @code{fetaBraces} are available using the simpler syntax described
1371 in @ref{Music notation inside markup}.
1373 When using the glyphs contained in @code{fetaBraces}, the size of the
1374 brace is specified by the numerical part of the glyph name, in
1375 arbitrary units. Any integer from @code{0} to @code{575} inclusive
1376 may be specified, @code{0} giving the smallest brace. The optimum
1377 value must be determined by trial and error. These glyphs are all
1378 left braces; right braces may be obtained by rotation, see
1379 @ref{Rotating objects}.
1381 Three families of text fonts are made available: the @emph{roman}
1382 (serif) font, that defaults to New Century Schoolbook, the @emph{sans}
1383 font and the monospaced @emph{typewriter} font -- these last two
1384 families are determined by the Pango installation.
1386 Each family may include different shapes and series. The following
1387 example demonstrates the ability to select alternate families, shapes,
1388 series and sizes. The value supplied to @code{font-size} is the
1389 required change from the default size.
1391 @lilypond[quote,verbatim,relative=2]
1392 \override Score.RehearsalMark #'font-family = #'typewriter
1393 \mark \markup "Ouverture"
1394 \override Voice.TextScript #'font-shape = #'italic
1395 \override Voice.TextScript #'font-series = #'bold
1396 d2.^\markup "Allegro"
1397 \override Voice.TextScript #'font-size = #-3
1402 A similar syntax may be used in markup mode; however in this case it
1403 is preferable to use the simpler syntax explained in @ref{Selecting
1404 font and font size}:
1406 @lilypond[quote,verbatim]
1410 \override #'(font-shape . italic)
1411 \override #'(font-size . 4)
1415 \override #'(font-family . typewriter)
1417 \override #'(font-series . bold)
1421 \override #'(font-family . sans)
1428 Although it is easy to switch between preconfigured fonts, it is also
1429 possible to use other fonts, as explained in the following sections:
1430 @ref{Single entry fonts} and @ref{Entire document fonts}.
1435 @ref{The Feta font},
1436 @ref{Music notation inside markup},
1437 @ref{Selecting font and font size},
1441 @node Single entry fonts
1442 @unnumberedsubsubsec Single entry fonts
1444 Any font that is installed on the operating system and recognized by
1445 FontConfig may be used in a score, using the following syntax:
1447 @lilypond[quote,verbatim,relative=2]
1448 \override Staff.TimeSignature #'font-name = #"Bitstream Charter"
1449 \override Staff.TimeSignature #'font-size = #2
1453 \override #'(font-name . "Vera Bold")
1458 @cindex fonts, finding available
1459 @cindex finding available fonts
1460 @cindex listing available fonts
1461 @cindex available fonts, listing
1463 @funindex show-available-fonts
1465 The following command displays a list of all available fonts on the
1469 lilypond -dshow-available-fonts x
1475 @ref{Fonts explained},
1476 @ref{Entire document fonts}.
1481 @c A source file gets never installed...
1483 @c @file{lily/@/font@/-config@/-scheme@/.cc}.
1486 @node Entire document fonts
1487 @unnumberedsubsubsec Entire document fonts
1489 It is possible to change the fonts to be used as the default fonts in
1490 the @emph{roman}, @emph{sans} and @emph{typewriter} font families by
1491 specifying them, in that order, as shown in the example below. For an
1492 explanation of fonts, see @ref{Fonts explained}.
1494 @cindex font families, setting
1495 @cindex fonts, changing for entire document
1497 @funindex make-pango-font-tree
1499 @lilypond[verbatim,quote]
1503 (make-pango-font-tree "Times New Roman"
1506 (/ myStaffSize 20)))
1513 \typewriter typewriter. }
1517 @c we don't do Helvetica / Courier, since GS incorrectly loads
1523 @ref{Fonts explained},
1524 @ref{Single entry fonts},
1525 @ref{Selecting font and font size},