]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/framework-ps.scm
Issue 5079/2: with-music-match: lists should match completely
[lilypond.git] / scm / framework-ps.scm
index 4df9ba3e6f90d52da14c257690ba0dbe24f5264b..aee522e0fa7e53b55101b7f14350d7d27fe2eeaa 100644 (file)
 
     (define (ps-load-file file-name)
       (if (string? file-name)
-          (if (string-contains file-name (ly:get-option 'datadir))
+          (if (and (not (ly:get-option 'font-export-dir))
+                   (string-contains file-name (ly:get-option 'datadir)))
               (begin
                 (set! file-name (ly:string-substitute (ly:get-option 'datadir)
                                                       "" file-name))
    "/lilypond-datadir where {pop} {userdict /lilypond-datadir (~a) put } ifelse"
    (ly:get-option 'datadir))
   (set! never-embed-font-list (list))
+  (if (ly:get-option 'font-export-dir)
+      (let ((dirname (format #f "~a" (ly:get-option 'font-export-dir))))
+        (if (file-exists? dirname)
+            (ly:debug
+             (_ "Font export directory `~a' already exists.") dirname)
+            (begin
+              (ly:debug
+               (_ "Making font export directory `~a'.") dirname)
+              (mkdir dirname)))))
   (if load-fonts?
       (for-each (lambda (f)
                   (format port "\n%%BeginFont: ~a\n" (car f))