summaryrefslogtreecommitdiff
path: root/Documentation/snippets/changing-the-default-text-font-family.ly
blob: 1534b107b75c85c4e836cf7339d9943a3f2dada1 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
%% DO NOT EDIT this file manually; it is automatically
%% generated from LSR http://lsr.dsi.unimi.it
%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
\version "2.14.2"

\header {
  lsrtags = "tweaks-and-overrides, text"

%% Translation of GIT committish: 1cda7b7b8219cb97399b8e7b56c1115aaf82c002
  texidocfr = "
Les familles de fontes par défaut pour le texte peuvent être changées à
l'aide de la fonction @code{make-pango-font-tree}.

"
  doctitlefr = "Changement des fontes textuelles par défaut"

  texidoc = "
The default font families for text can be overridden with
@code{make-pango-font-tree}.

"
  doctitle = "Changing the default text font family"
} % begin verbatim


\paper {
  % change for other default global staff size.
  myStaffSize = #20
  %{
     run
         lilypond -dshow-available-fonts blabla
     to show all fonts available in the process log.
  %}

  #(define fonts
    (make-pango-font-tree "Times New Roman"
                          "Nimbus Sans"
                          "Luxi Mono"
;;                        "Helvetica"
;;                        "Courier"
     (/ myStaffSize 20)))
}

\relative c'' {
  c4^\markup {
    roman: foo \bold bla \italic bar \italic \bold baz
  }
  c'4_\markup {
    \override #'(font-family . sans)
    {
      sans: foo \bold bla \italic bar \italic \bold baz
    }
  }
  c'2^\markup {
    \override #'(font-family . typewriter)
    {
      mono: foo \bold bla \italic bar \italic \bold baz
    }
  }
}