From: David Kastrup Date: Sat, 5 Apr 2014 14:29:57 +0000 (+0200) Subject: Issue 3880: bad number formatting in svg path output X-Git-Tag: release/2.19.5-1~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0b4a6579d13603db4c786c8ecbde2ae52b1c6050;p=lilypond.git Issue 3880: bad number formatting in svg path output This uses ly:format with "~4f" format string rather than format with "~S" for formatting point lists. Note that "~4f" has a different meaning in ly:format as compared to plain format. This is consistent with other number formatting. Also does this for output of color. The previous output was problematic when the number was an exact fraction. --- diff --git a/scm/output-svg.scm b/scm/output-svg.scm index d00757f4e2..1ddb276d31 100644 --- a/scm/output-svg.scm +++ b/scm/output-svg.scm @@ -83,7 +83,7 @@ (define (helper lst) (if (null? lst) '() - (cons (format #f "~S ~S" (car lst) (- (cadr lst))) + (cons (ly:format "~4f ~4f" (car lst) (- (cadr lst))) (helper (cddr lst))))) (string-join (helper lst) " ")) @@ -615,7 +615,7 @@ '(fill . "currentColor"))) (define (setcolor r g b) - (format #f "\n" + (ly:format "\n" (* 100 r) (* 100 g) (* 100 b))) ;; rotate around given point