]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4544 / 2: Fix LilyPond default fonts definition
authorMasamichi Hosoda <trueroad@trueroad.jp>
Sat, 8 Aug 2015 10:06:50 +0000 (19:06 +0900)
committerMasamichi Hosoda <trueroad@trueroad.jp>
Fri, 14 Aug 2015 10:47:42 +0000 (19:47 +0900)
Due to conf file loading order, generic font aliases
`serif', `sans-serif', 'monospace' were unavailable
in LilyPond default fonts definition.
So the glyphs that are not contained
in the list of font definition,
like Japanese glyphs were used unexpected font.

This commit changes
LilyPond default fonts definition loading order
for enabling the aliases.

mf/00-lilypond-fonts.conf.in [new file with mode: 0644]
mf/99-lilypond-fonts.conf.in [new file with mode: 0644]
mf/lilypond-fonts.conf.in [deleted file]
scm/font.scm

diff --git a/mf/00-lilypond-fonts.conf.in b/mf/00-lilypond-fonts.conf.in
new file mode 100644 (file)
index 0000000..91f90af
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+
+  <!--
+  Define LilyPond default fonts. Where a character doesn't exist in the
+  first font listed, the next font listed will be used instead for that
+  character. Also see scm/font.scm.
+  -->
+
+  <alias binding="strong">
+    <family>LilyPond Serif</family>
+    <prefer>
+      <family>Century Schoolbook L</family>
+      <family>DejaVu Serif</family>
+    </prefer>
+    <default>
+      <family>serif</family>
+    </default>
+  </alias>
+
+  <alias binding="strong">
+    <family>LilyPond Sans Serif</family>
+    <prefer>
+      <family>Nimbus Sans L</family>
+      <family>DejaVu Sans</family>
+    </prefer>
+    <default>
+      <family>sans-serif</family>
+    </default>
+  </alias>
+
+  <alias binding="strong">
+    <family>LilyPond Monospace</family>
+    <prefer>
+      <family>Nimbus Mono L</family>
+      <family>DejaVu Sans Mono</family>
+    </prefer>
+    <default>
+      <family>monospace</family>
+    </default>
+  </alias>
+
+</fontconfig>
diff --git a/mf/99-lilypond-fonts.conf.in b/mf/99-lilypond-fonts.conf.in
new file mode 100644 (file)
index 0000000..83f8b53
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+
+  <!--
+      Reject bitmap fonts
+      from fontconfig 70-no-bitmaps.conf
+      LilyPond can not use bitmap fonts.
+  -->
+
+  <selectfont>
+    <rejectfont>
+      <pattern>
+       <patelt name="scalable"><bool>false</bool></patelt>
+      </pattern>
+    </rejectfont>
+  </selectfont>
+
+</fontconfig>
diff --git a/mf/lilypond-fonts.conf.in b/mf/lilypond-fonts.conf.in
deleted file mode 100644 (file)
index e32baf8..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
-<fontconfig>
-
-  <!--
-  Define LilyPond default fonts. Where a character doesn't exist in the
-  first font listed, the next font listed will be used instead for that
-  character. Also see scm/font.scm.
-  -->
-
-  <alias binding="strong">
-    <family>LilyPond Serif</family>
-    <prefer>
-      <family>Century Schoolbook L</family>
-      <family>DejaVu Serif</family>
-    </prefer>
-    <default>
-      <family>serif</family>
-    </default>
-  </alias>
-
-  <alias binding="strong">
-    <family>LilyPond Sans Serif</family>
-    <prefer>
-      <family>Nimbus Sans L</family>
-      <family>DejaVu Sans</family>
-    </prefer>
-    <default>
-      <family>sans-serif</family>
-    </default>
-  </alias>
-
-  <alias binding="strong">
-    <family>LilyPond Monospace</family>
-    <prefer>
-      <family>Nimbus Mono L</family>
-      <family>DejaVu Sans Mono</family>
-    </prefer>
-    <default>
-      <family>monospace</family>
-    </default>
-  </alias>
-
-  <!--
-      Reject bitmap fonts
-      from fontconfig 70-no-bitmaps.conf
-      LilyPond can not use bitmap fonts.
-  -->
-
-  <selectfont>
-    <rejectfont>
-      <pattern>
-       <patelt name="scalable"><bool>false</bool></patelt>
-      </pattern>
-    </rejectfont>
-  </selectfont>
-
-</fontconfig>
index cad14c9ec531cfd9b90a34712b3f4f45698a5087..5adf258831ce73c49593b1cecf0b2ed9a0775770 100644 (file)
@@ -251,8 +251,8 @@ used.  This is used to select the proper design size for the text fonts.
 ; 'typewriter.
 ;
 ; Note that 'LilyPond Serif', 'LilyPond Sans Serif' and 'Lilypond Monospace'
-; are aliases that are defined in mf/lilypond-fonts.conf.in (source file)
-; or fonts/lilypond-fonts.conf (installed file).
+; are aliases that are defined in mf/00-lilypond-fonts.conf.in (source file)
+; or fonts/00-lilypond-fonts.conf (installed file).
 
 (define*-public (set-global-fonts #:key 
   (music "emmentaler")