]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4598 / 1: Change example's font name
authorMasamichi Hosoda <trueroad@trueroad.jp>
Fri, 11 Sep 2015 16:08:36 +0000 (01:08 +0900)
committerMasamichi Hosoda <trueroad@trueroad.jp>
Thu, 17 Sep 2015 14:33:12 +0000 (23:33 +0900)
Most environments have "Nimbus Sans L" instead of "Nimbus Sans".
This commit replaces "Nimbus Sans" with the list of
"Nimbus Sans" and "Nimbus Sans L".

Documentation/snippets/new/changing-the-default-text-font-family.ly [new file with mode: 0644]
input/regression/font-family-override.ly

diff --git a/Documentation/snippets/new/changing-the-default-text-font-family.ly b/Documentation/snippets/new/changing-the-default-text-font-family.ly
new file mode 100644 (file)
index 0000000..b4ab595
--- /dev/null
@@ -0,0 +1,48 @@
+\version "2.18.0"
+
+\header {
+  lsrtags = "text, tweaks-and-overrides"
+
+  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,Nimbus Sans L"
+                          "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
+    }
+  }
+}
index cc7fe81033c18bf459866652722b95336e16c735..b738142a35a4b624e2f6984b6ddf3483d591a2a6 100644 (file)
@@ -25,7 +25,7 @@
 
   #(define fonts
     (make-pango-font-tree "Times New Roman"
-                          "Nimbus Sans"
+                          "Nimbus Sans,Nimbus Sans L"
                           "Luxi Mono"
 
 ;;     "Helvetica"