]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/framework-ps.scm
* scm/lily.scm (postscript->png): use ~a iso. ~s
[lilypond.git] / scm / framework-ps.scm
index 288e36ad20153a3f4bab72637865f186efff4a98..67c35ebfc0871a09d37e8d197d362287115bde31 100644 (file)
@@ -82,6 +82,9 @@
        plain " " coding-vector " /" command " reencode-font\n"
        "/" command "{ /" command " findfont 1 scalefont } bind def\n")))
 
+  (define (standard-tex-font? x)
+    (or (equal? (substring x 0 2) "ms")
+       (equal? (substring x 0 2) "cm")))
  
   (define (font-load-command font)
     (let* ((specced-font-name (ly:font-name font))
           (ops (ly:output-def-lookup bookpaper 'outputscale))
           (scaling (* ops magnification designsize)))
 
+      ;; Bluesky pfbs have UPCASE names (sigh.)
+      ;;
+      (if (standard-tex-font? fontname)
+         (set! fontname (string-upcase fontname)))
+      
       ;; debugging: [output]encoding is broken
       ;; found so far: coding-alist is empty!
       (pdebug "font: ~S\n" font)
       ((defs (ly:paper-book-book-paper book))
        (size (ly:output-def-lookup defs 'papersize)))
 
-    (postscript->pdf (if (string? size) size "a4")
-                    name)))
-
+    (if (equal? name "-")
+       (ly:warn "Can't convert <stdout> to PDF")
+       (postscript->pdf (if (string? size) size "a4")
+                        name))))
+  
 (define-public (convert-to-png book name)
   (let*
       ((defs (ly:paper-book-book-paper book))