4.2.2 Setting the staff size

The default staff size is 20 points, which corresponds to a staff height of 7.03mm (one point is equal to 100/7227 of an inch, or 2540/7227 mm). The staff size may be changed in three ways:

  1. To set the staff size globally for all scores in a file (or in a \book block, to be precise), use set-global-staff-size:
    #(set-global-staff-size 14)
    

    The above example sets the global default staff size to 14pt (4.92mm) and scales all fonts accordingly.

  2. To set the staff size for a single score within a book, use layout-set-staff-size inside that score’s \layout block:
    \score {
      …
      \layout {
        #(layout-set-staff-size 14)
      }
    }
    
  3. To set the staff size for a single staff within a system, set the staff’s font-size and staff-space using units relative to the score’s default staff size. Using relative units prevents the proportion of staff sizes from being altered if the default staff size is modified with set-global-staff-size or layout-set-staff-size.

    For example, traditionally engraved chamber music scores with piano often used 7mm piano staves while the other staves were up to 5/7 as large (if space allowed), or down to 3/5 as large (if space was cramped). To achieve the 5/7 proportion, use:

    \score {
      <<
        \new Staff \with {
          fontSize = #(magnification->font-size 5/7)
          \override StaffSymbol.staff-space = #5/7
        } { … }
        \new PianoStaff { … }
      >>
    }
    

    If you happen to know which fontSize you wish to use, you could use the following form:

    \score {
      <<
        \new Staff \with {
          fontSize = -3
          \override StaffSymbol.staff-space = #(magstep -3)
        } { … }
        \new PianoStaff { … }
      >>
    }
    

    To emulate the look of traditional engraving, it is best to avoid reducing the thickness of the staff lines.

Automatic font weight at different sizes

The Feta font provides musical symbols at eight different sizes. Each font is tuned for a different staff size: at a smaller size the font becomes heavier, to match the relatively heavier staff lines. The recommended font sizes are listed in the following table:

font namestaff height (pt)staff height (mm)use
feta1111.223.9pocket scores
feta1312.604.4
feta1414.145.0
feta1615.875.6
feta1817.826.3song books
feta20207.0standard parts
feta2322.457.9
feta2625.28.9

See also

Notation Reference: Selecting notation font size.

Snippets: Spacing.

Known issues and warnings

layout-set-staff-size does not change the distance between the staff lines.


Other languages: deutsch, español, français, italiano, 日本語.
About automatic language selection.

LilyPond — Notation Reference v2.19.10 (development-branch).