]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/framework-svg.scm
* The grand 2005-2006 replace.
[lilypond.git] / scm / framework-svg.scm
index f159a5059dc1a1a3acdb6cf0851093ef4ee40a0d..49841f25c5cd57f5f64f14c97400c245bc2c1a9b 100644 (file)
@@ -1,8 +1,9 @@
-;;;; framework-svg.scm --
+;;
+;; framework-svg.scm -- structure for SVG output
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 2004--2005 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 2004--2006 Jan Nieuwenhuizen <janneke@gnu.org>
 
 (define-module (scm framework-svg))
 
@@ -17,7 +18,7 @@
 
 (define-public (output-framework basename book scopes fields)
   (let* ((filename (format "~a.svg" basename))
-        (outputter  (ly:make-paper-outputter filename
+        (outputter  (ly:make-paper-outputter (open-file filename "wb")
                                              (ly:output-backend)))
         (dump (lambda (str) (display str (ly:outputter-port outputter))))
         (paper (ly:paper-book-paper book))
@@ -45,7 +46,7 @@
              `(width . ,(format #f "~s" page-width))
              `(height . ,(format #f "~s" page-height))))
     
-;    (dump (dump-fonts outputter paper))
+    (dump (dump-fonts outputter paper))
     (dump
      (string-append
       ;; FIXME: only use pages if there are more than one, pageSet is
@@ -97,7 +98,7 @@
                (lambda (x)
                  (let ((file-name (ly:find-file (string-append x ".svg"))))
                    (if file-name (embed-font (cached-file-contents file-name))
-                       (begin (ly:warn "cannot find SVG font ~S" x) ""))))
+                       (begin (ly:warning "cannot find SVG font ~S" x) ""))))
                (filter string? font-names))))
     (entity 'defs (string-join svgs "\n"))))