Next: , Previous: Text markup introduction, Up: Formatting text


1.8.2.2 Selecting font and font size

Basic font switching is supported in markup mode:

     
     {
       d1^\markup { 
         \bold { Più mosso } 
         \italic { non troppo \underline Vivo } 
       }
       r2 r4 r8
       d,_\markup { \italic quasi \smallCaps Tromba }
       f1 d2 r
     }

[image of music]

The size of the characters can also be altered in different ways:

The following example demonstrates these three methods:

     
     {
       f1^\markup { \fontsize #5 Sinfonia } 
       a,_\markup { 
         \tiny espressivo
         \large e
         \normalsize intenso 
       }
       bes^\markup { (con 
         \larger grande 
         \smaller emozione 
         \magnify #0.6 { e sentimento } )
       }
       d c2 r8 c bes a g1
     }

[image of music]

Text may be printed as subscript or superscript. By default these are printed in a smaller size, but a normal size can be used as well:

     
     \markup {
       \column {
         \line { 1 \super st movement }
         \line { 1 \normal-size-super st movement 
           \sub { (part two) }  }
       }
     }

[image of music]

The markup mode provides an easy way to select alternate font families. The default serif font, of roman type, is automatically selected unless specified otherwise: on the last line of the following example, there is no difference between the first and the second word.

     
     \markup {
       \column {
         \line { Act \number 1 }
         \line { \sans { Scene I. } }
         \line { \typewriter { Verona. An open place. } }
         \line { Enter \roman Valentine and Proteus. }
       }
     }

[image of music]

Some of these font families, used for specific items such as numbers or dynamics, do not provide all characters, as mentioned in New dynamic marks and Manual repeat marks.

When used inside a word, some font-switching or formatting commands may produce an unwanted blank space. This can easily be solved by concatenating the text elements together:

     
     \markup {
       \column {
         \line {
           \concat { 1 \super st }
           movement
         }
         \line {
           \concat { \dynamic p , }
           \italic { con dolce espressione }
         }
       }
     }

[image of music]

An exhaustive list of font-switching, font-size and font-families related commands can be found in Font.

Defining custom font sets is also possible, as explained in Fonts.

Predefined commands

\teeny, \tiny, \small, \normalsize, \large, \huge.

Diese Seite ist für LilyPond-2.11.58 (Entwicklungszweig).

Fehler bitte an http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs melden.

Ihre Vorschläge für die Dokumentation sind willkommen.