]> git.donarmstrong.com Git - lilypond.git/commitdiff
(write-preamble): use it to pick exactly
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 21 Jan 2006 00:32:52 +0000 (00:32 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 21 Jan 2006 00:32:52 +0000 (00:32 +0000)
the right font from a Mac dfont.
(write-preamble): don't forget directory, only look at files.

ChangeLog
scm/framework-ps.scm

index a7d758b776eb0590d0a14e04e8169f43c2682ad6..b1a04dab2bedcbaa3ee230e8475b8d60ca2ef464 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * scm/framework-ps.scm (write-preamble): use it to pick exactly
        the right font from a Mac dfont.
+       (write-preamble): don't forget directory, only look at files.
 
        * lily/ttf.cc (LY_DEFINE): ly:ttf-ps-name: new routine to extract
        PS name from TTF font.
index d2092c8d67539123c9459ff91fa06386a7bace45..d3a0891ff2708d7c4f064fa152f2f96bd4d8c839 100644 (file)
                    (format "cd ~a && fondu -force '~a'" dir-name filename)))
       
       (set! files (dir-listing dir-name))
-
+      
       (for-each
        (lambda (f)
-        (if (and (not embed)
-                 (equal? name (ly:ttf-ps-name f)))
-            (set! embed
-                  (font-file-as-ps-string name (dir-join dir-name f))))
-        
-        (if (or (equal? "." f) 
-                (equal? ".." f))
-            #t
-            (delete-file (dir-join dir-name f))))
+        (let*
+            ((full-name  (dir-join dir-name f)))
+          
+          (if (and (not embed)
+                   (equal? 'regular (stat:type (stat full-name)))
+                   (equal? name (ly:ttf-ps-name full-name)))
+              
+              (set! embed
+                    (font-file-as-ps-string name full-name)))
+          
+          (if (or (equal? "." f) 
+                  (equal? ".." f))
+              #t
+              (delete-file full-name))))
+
+
        files)
       (rmdir dir-name)