lilypond-auto
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lilypond-auto] Issue 3880 in lilypond: bad number formatting in svg pat


From: lilypond
Subject: [Lilypond-auto] Issue 3880 in lilypond: bad number formatting in svg path output
Date: Tue, 11 Mar 2014 13:16:59 +0000

Status: Accepted
Owner: ----
Labels: Type-Enhancement

New issue 3880 by address@hidden: bad number formatting in svg path output
http://code.google.com/p/lilypond/issues/detail?id=3880

lpietsch wrote :

There may be a bug in scm/output-svg.scm, in the function that processes
stencil expressions created with "(ly:create-stencil '(path ...))". If a
coordinate in the path expression happens to be the result of a Scheme
computation that is a fractional rational number, it will be written into
the SVG output literally as a Scheme fraction (e.g. "3/2"). SVG does not
understand this format.

Test snippet:

\once \override NoteHead.stencil =
   #(ly:make-stencil `(path 0.2
            '(moveto 0 0
              rlineto 0 ,(/ 3 2))
            'round 'round #f)
         '(-0.1 . 0.1)'(0 . 1.5))
c4

This stencil will not display in SVG output, though it does display fine in
PS and PDF.

A possible fix may be to change line 86 of /scm/output-svg.scm to force
output as a decimal number. Change from:

        (cons (format #f "~S ~S" (car lst) (- (cadr lst)))

to:

        (cons (ly:format "~4f ~4f" (car lst) (- (cadr lst)))


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings



reply via email to

[Prev in Thread] Current Thread [Next in Thread]