]> git.donarmstrong.com Git - lilypond.git/commitdiff
Use the correct generic font-family names
authorPatrick McCarty <pnorcks@gmail.com>
Sat, 11 Jul 2009 22:55:17 +0000 (15:55 -0700)
committerPatrick McCarty <pnorcks@gmail.com>
Sat, 11 Jul 2009 22:55:17 +0000 (15:55 -0700)
* Replace "Mono" with "monospace", and replace "Sans"
  with "sans-serif".  This corresponds to the W3C
  recommendations and is compatible with FontConfig/Pango.

* A serif font should be chosen if the user removes
  "Century Schoolbook L" from their LilyPond
  installation.  In the case of the SVG backend,
  fallback to a serif font if Century Schoolbook L
  is not installed.

* Remove trailing whitespace

scm/font.scm

index c29258860c2a6cabedf3623a3ec7c25da3fb21d8..434e46a6088a1b0753fb999d4d29cd1dc40c5860 100644 (file)
@@ -1,7 +1,7 @@
 ;;;; font.scm -- construct font trees
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
+;;;;
 ;;;; (c) 2004--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 ;; TODO:
         qualifier default)
   (make <Font-tree-node>
     #:qualifier qualifier
-    #:default default 
+    #:default default
     #:children (make-hash-table 11)))
 
 (define-method (display (leaf <Font-tree-leaf>) port)
   (map (lambda (x) (display x port))
        (list
        "#<Font-size-family:\n"
-       (slot-ref leaf 'default-size) 
+       (slot-ref leaf 'default-size)
        (slot-ref leaf 'size-vector)
        "#>"
        )))
@@ -50,7 +50,7 @@
     "(def: "
     (font-default node)
     ") {\n"))
-  (for-each 
+  (for-each
    (lambda (x)
      (display "\n")
      (display (car x) port)
@@ -65,7 +65,7 @@
 (define-method (add-font (node <Font-tree-node>) fprops size-family)
   (define (assoc-delete key alist)
     (assoc-remove! (list-copy alist) key))
-  
+
   (define (make-node fprops size-family)
     (if (null? fprops)
        (make-font-tree-leaf (car size-family) (cdr size-family))
      (fetaNumber ,(ly:pt 20.0) ,feta-alphabet-size-vector)
      (fetaMusic ,(ly:pt 20.0)
                #(,(delay (ly:system-font-load "emmentaler-11"))
-                 ,(delay (ly:system-font-load "emmentaler-13"))                  
+                 ,(delay (ly:system-font-load "emmentaler-13"))
                  ,(delay (ly:system-font-load "emmentaler-14"))
-                 ,(delay (ly:system-font-load "emmentaler-16"))                  
+                 ,(delay (ly:system-font-load "emmentaler-16"))
                  ,(delay (ly:system-font-load "emmentaler-18"))
-                 ,(delay (ly:system-font-load "emmentaler-20"))                  
-                 ,(delay (ly:system-font-load "emmentaler-23"))                  
+                 ,(delay (ly:system-font-load "emmentaler-20"))
+                 ,(delay (ly:system-font-load "emmentaler-23"))
                  ,(delay (ly:system-font-load "emmentaler-26"))))
      (fetaBraces ,(ly:pt 20.0)
                 #(,(delay (ly:system-font-load "aybabtu")))))))
                          (font-shape . ,shape)))
                       (ly:pt 12)))))))
 
-  (add-node 'upright 'normal) 
-  (add-node 'caps 'normal) 
-  (add-node 'upright 'bold) 
+  (add-node 'upright 'normal)
+  (add-node 'caps 'normal)
+  (add-node 'upright 'bold)
   (add-node 'italic 'normal)
   (add-node 'italic 'bold))
 
 
 (define-public (make-century-schoolbook-tree factor)
   (make-pango-font-tree
-    "Century Schoolbook L
-    "Sans" "Mono" factor))
+    "Century Schoolbook L,serif"
+    "sans-serif" "monospace" factor))
 
 (define-public (magstep s)
   (exp (* (/ s 6) (log 2))))