From 28f58ecc2271956e9377dc61e5135ce3ade4abbd Mon Sep 17 00:00:00 2001 From: Masamichi Hosoda Date: Fri, 12 Jun 2015 17:17:56 +0900 Subject: [PATCH] Issue 4441 / 4: Define default fonts in fontconfig configuration file This commit defines LilyPond default fonts in local fontconfig configuration file. And, LilyPond uses them. It is possible to combine multiple fonts with different character sets and glyphs each other. e.g. Following fonts can be combined. Latin glyphs: from a font without Cyrillic glyphs Cyrillic glyphs: from another font with Cyrillic glyphs --- mf/lilypond-fonts.conf.in | 36 ++++++++++++++++++++++++++++++++++++ scm/font.scm | 12 ++++++------ 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/mf/lilypond-fonts.conf.in b/mf/lilypond-fonts.conf.in index 43e52c8578..3cd59becad 100644 --- a/mf/lilypond-fonts.conf.in +++ b/mf/lilypond-fonts.conf.in @@ -1,4 +1,40 @@ + + + + + LilyPond Serif + + Century Schoolbook L + DejaVu Serif + + + serif + + + + + LilyPond Sans Serif + + Nimbus Sans L + DejaVu Sans + + + sans-serif + + + + + LilyPond Monospace + + Nimbus Mono L + DejaVu Sans Mono + + + monospace + + + diff --git a/scm/font.scm b/scm/font.scm index 0582a492a1..82f6d48990 100644 --- a/scm/font.scm +++ b/scm/font.scm @@ -252,9 +252,9 @@ used. This is used to select the proper design size for the text fonts. (define*-public (set-global-fonts #:key (music "emmentaler") (brace "emmentaler") - (roman "Century Schoolbook L") - (sans "Nimbus Sans L") - (typewriter "Nimbus Mono L") + (roman "LilyPond Serif") + (sans "LilyPond Sans Serif") + (typewriter "LilyPond Monospace") (factor 1)) (let ((n (make-font-tree-node 'font-encoding 'fetaMusic))) (add-music-fonts n 'feta music brace feta-design-size-mapping factor) @@ -273,9 +273,9 @@ used. This is used to select the proper design size for the text fonts. (define-public (make-century-schoolbook-tree factor) (make-pango-font-tree - "Century Schoolbook L" - "Nimbus Sans L" - "Nimbus Mono L" + "LilyPond Serif" + "LilyPond Sans Serif" + "LilyPond Monospace" factor)) (define-public all-text-font-encodings -- 2.39.5