From d900000e63555ff30b74b50cc31a8d2a2cb63b6a Mon Sep 17 00:00:00 2001 From: Masamichi Hosoda Date: Sat, 12 Sep 2015 01:08:36 +0900 Subject: [PATCH] Issue 4598 / 1: Change example's font name 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". --- .../changing-the-default-text-font-family.ly | 48 +++++++++++++++++++ input/regression/font-family-override.ly | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 Documentation/snippets/new/changing-the-default-text-font-family.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 index 0000000000..b4ab595995 --- /dev/null +++ b/Documentation/snippets/new/changing-the-default-text-font-family.ly @@ -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 + } + } +} diff --git a/input/regression/font-family-override.ly b/input/regression/font-family-override.ly index cc7fe81033..b738142a35 100644 --- a/input/regression/font-family-override.ly +++ b/input/regression/font-family-override.ly @@ -25,7 +25,7 @@ #(define fonts (make-pango-font-tree "Times New Roman" - "Nimbus Sans" + "Nimbus Sans,Nimbus Sans L" "Luxi Mono" ;; "Helvetica" -- 2.39.2