]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/changing-the-default-text-font-family.ly
Run scripts/auxiliar/update-with-convert-ly.sh
[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.dsi.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.16.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
21 \paper {
22   % change for other default global staff size.
23   myStaffSize = #20
24   %{
25      run
26          lilypond -dshow-available-fonts blabla
27      to show all fonts available in the process log.
28   %}
29
30   #(define fonts
31     (make-pango-font-tree "Times New Roman"
32                           "Nimbus Sans"
33                           "Luxi Mono"
34 ;;                        "Helvetica"
35 ;;                        "Courier"
36      (/ myStaffSize 20)))
37 }
38
39 \relative c'' {
40   c4^\markup {
41     roman: foo \bold bla \italic bar \italic \bold baz
42   }
43   c'4_\markup {
44     \override #'(font-family . sans)
45     {
46       sans: foo \bold bla \italic bar \italic \bold baz
47     }
48   }
49   c'2^\markup {
50     \override #'(font-family . typewriter)
51     {
52       mono: foo \bold bla \italic bar \italic \bold baz
53     }
54   }
55 }