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