]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc: simplify example changing default fonts (3027)
authorTrevor Daniels <t.daniels@treda.co.uk>
Sun, 30 Dec 2012 10:00:09 +0000 (10:00 +0000)
committerTrevor Daniels <t.daniels@treda.co.uk>
Mon, 7 Jan 2013 09:10:54 +0000 (09:10 +0000)
  The original function required the global staff size
  to be re-entered as myStaffSize, but this can be calculated
  from the value of staff-height, so avoiding having to
  replicate the value.

Documentation/notation/text.itely

index 04ae36c4c5fbed8c1fa4998cc41387d20f50593a..6a33b69084083a87a31230beb4db4f32727fa9af 100644 (file)
@@ -1501,8 +1501,9 @@ Snippets:
 
 It is possible to change the fonts to be used as the default fonts in
 the @emph{roman}, @emph{sans} and @emph{typewriter} font families by
-specifying them, in that order, as shown in the example below.  For an
-explanation of fonts, see @ref{Fonts explained}.
+specifying them, in that order, as shown in the example below, which
+automatically scales the fonts with the value set for the global staff
+size.  For an explanation of fonts, see @ref{Fonts explained}.
 
 @cindex font families, setting
 @cindex fonts, changing for entire document
@@ -1511,12 +1512,11 @@ explanation of fonts, see @ref{Fonts explained}.
 
 @lilypond[verbatim,quote]
 \paper  {
-  myStaffSize = #20
   #(define fonts
     (make-pango-font-tree "Times New Roman"
                           "Nimbus Sans"
                           "Luxi Mono"
-                           (/ myStaffSize 20)))
+                           (/ (* staff-height pt) 2)))
 }
 
 \relative c'{