]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/changing-the-default-text-font-family.ly
Run scripts/auxiliar/makelsr.py
[lilypond.git] / Documentation / snippets / new / changing-the-default-text-font-family.ly
1 \version "2.18.0"
2
3 \header {
4   lsrtags = "text, tweaks-and-overrides"
5
6   texidoc = "
7 The default font families for text can be overridden with
8 @code{make-pango-font-tree}.
9
10 "
11   doctitle = "Changing the default text font family"
12 }
13
14 \paper {
15   % change for other default global staff size.
16   myStaffSize = #20
17   %{
18      run
19          lilypond -dshow-available-fonts blabla
20      to show all fonts available in the process log.
21   %}
22
23   #(define fonts
24     (make-pango-font-tree "Times New Roman"
25                           "Nimbus Sans,Nimbus Sans L"
26                           "Luxi Mono"
27 ;;                        "Helvetica"
28 ;;                        "Courier"
29      (/ myStaffSize 20)))
30 }
31
32 \relative c'' {
33   c4^\markup {
34     roman: foo \bold bla \italic bar \italic \bold baz
35   }
36   c'4_\markup {
37     \override #'(font-family . sans)
38     {
39       sans: foo \bold bla \italic bar \italic \bold baz
40     }
41   }
42   c'2^\markup {
43     \override #'(font-family . typewriter)
44     {
45       mono: foo \bold bla \italic bar \italic \bold baz
46     }
47   }
48 }