]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/font.scm
* The grand 2005-2006 replace.
[lilypond.git] / scm / font.scm
index 2dd29cc9d49953672374295207e965bd700969db..4173aa424269b79281269354cb1056538fa1f183 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 ;; TODO:
 ;;
 (define-method (display (leaf <Font-tree-leaf>) port)
   (map (lambda (x) (display x port))
        (list
-       "Font-size-family: \n"
+       "#<Font-size-family: \n"
        (slot-ref leaf 'default-size) 
-       (slot-ref leaf 'size-vector))))
+       (slot-ref leaf 'size-vector)
+       "#>"
+       )))
 
 (define-method (display (node <Font-tree-node>) port)
 
@@ -66,6 +68,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))
   (add-node 'italic 'bold))
 
 (define-public (make-cmr-tree factor)
-  (let ((n (make-font-tree-node 'font-encoding 'fetaMusic)))
+  (let*
+      ((n (make-font-tree-node 'font-encoding 'fetaMusic))
+       (module (resolve-module '(scm kpathsea)))
+       (find (eval 'ly:kpathsea-find-file module))
+       )
     (add-music-fonts n factor)
     (add-cmr-fonts n factor)
-    (if (defined? 'ly:kpathsea-find-file)
-       (begin
-         (if (ly:kpathsea-find-file "lmr10.pfb")
-             (add-cork-lm-fonts n factor))
-         (if (ly:kpathsea-find-file "ecrm10.pfa")
-             (add-ec-fonts n factor))))
+    
+    (if (find "lmr10.pfb")
+       (add-cork-lm-fonts n factor))
+    (if (find "ecrm10.pfa")
+       (add-ec-fonts n factor))
     n))