]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-svg.scm
Improvements in vertical skyline approximations (issue 2148).
[lilypond.git] / scm / output-svg.scm
index 9f10629eacf7a6f2a3f4fc913aaa5ff3ee9a65a3..a15a9d8ad0bc59432a8b69bf164017a56fa78ccf 100644 (file)
           (begin
             (set! path (apply dump-path d-attr-value
                                         font-scale
-                                        (list (cadr rest) (caddr rest))))
+                                        (list (caddr rest) (cadddr rest))))
             (set! next-horiz-adv (+ next-horiz-adv
                                     (car rest)))
             path))
            ""))))
 
 (define (extract-glyph-info all-glyphs glyph size)
-  (let* ((offsets (list-head glyph 3))
+  (let* ((offsets (list-head glyph 4))
         (glyph-name (car (reverse glyph))))
     (apply extract-glyph all-glyphs glyph-name size offsets)))
 
 (define (embedded-svg string)
   string)
 
-(define (embedded-glyph-string font size cid glyphs)
+(define (embedded-glyph-string pango-font font size cid glyphs)
   (define path "")
   (if (= 1 (length glyphs))
       (set! path (music-string-to-path font size (car glyphs)))
   (set! next-horiz-adv 0.0)
   path)
 
-(define (woff-glyph-string font-name size cid? w-x-y-named-glyphs)
+(define (woff-glyph-string pango-font font-name size cid? w-h-x-y-named-glyphs)
   (let* ((name-style (font-name-style font-name))
         (family-designsize (regexp-exec (make-regexp "(.*)-([0-9]*)")
                                         font-name))
         (font (ly:paper-get-font paper `(((font-family . ,family)
                                           ,(if design-size
                                                `(design-size . design-size)))))))
-    (define (glyph-spec w x y g)
+    (define (glyph-spec w h x y g) ; h not used
       (let* ((charcode (ly:font-glyph-name-to-charcode font g))
             (char-lookup (format #f "&#~S;" charcode))
             (glyph-by-name (eoc 'altglyph `(glyphname . ,g)))
          (string-append glyph-by-name apparently-broken char-lookup)))))
 
     (string-join (map (lambda (x) (apply glyph-spec x))
-                     (reverse w-x-y-named-glyphs)) "\n")))
+                     (reverse w-h-x-y-named-glyphs)) "\n")))
 
 (define glyph-string
   (if (not (ly:get-option 'svg-woff)) embedded-glyph-string woff-glyph-string))