Hi Simon,

Am Freitag, den 21.02.2020, 09:29 +0000 schrieb pkx1...@posteo.net:
> Hello Simon,
> 
> On 20/02/2020 18:33, Simon Tatham wrote:
> > A user of my notation font Gonville reported to me this week that they
> > had tried to use the Lilypond SVG backend with Gonville, and had found
> > that everything worked fine except that the sharp signs were
> > mysteriously missing from the output.
> > 
> > I debugged the problem and found that this happened because Fontforge
> > had generated the SVG path string for that glyph in a way that happened
> > to include the floating-point literal "9.91821e-05", written in
> > scientific notation, and that the 'glyph-path-regexp' definition in
> > output-svg.scm was failing to match the path string as a result, because
> > it doesn't permit the letter 'e'.
> > 
> > I was able to work around the issue by editing my SVG font file to
> > re-express that number as 0.0000991821, without the 'e'. But as far as I
> > can see, scientific notation of that form is legal per the SVG spec:
> > https://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataBNF
> > 
> > 
> > Applying the attached patch against output-svg.scm also solved the
> > problem for me, and I think it's a better fix.
> > 
> > Cheers,
> > Simon
> 
> Thanks I'll shepherd the patch through our normal patch review process - 
> I'll cc you on the review in case the 'real' LilyPond developers have 
> any concerns/questions/comments (I am not really a developer, I just 
> help with testing and submitting 'drive-by' patches).

looking at https://sourceforge.net/p/testlilyissues/issues/5779/ and
the grammar you linked, I think the regular expression is also missing
'+Aa,'. Does it make sense to fuse attached patch?

Jonas
From a70b80c17d52225d120b8973f3d9b02ffc75ee7f Mon Sep 17 00:00:00 2001
From: Jonas Hahnfeld <hah...@hahnjo.de>
Date: Fri, 21 Feb 2020 12:20:25 +0100
Subject: [PATCH 2/2] Also allow '+Aa,' in SVG path descriptions

See https://www.w3.org/TR/2011/REC-SVG11-20110816/paths.html#PathDataBNF
---
 scm/output-svg.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scm/output-svg.scm b/scm/output-svg.scm
index a8a90e2d07..0f512f8ab7 100644
--- a/scm/output-svg.scm
+++ b/scm/output-svg.scm
@@ -194,7 +194,7 @@
 
 ;; Matches the optional path data from <glyph>
 (define glyph-path-regexp
-  (make-regexp "d=\"([-MmZzLlHhVvCcSsQqTtEe0-9.\n ]*)\""))
+  (make-regexp "d=\"([+-MmZzLlHhVvCcSsQqTtAa0-9,.Ee\n ]*)\""))
 
 ;; Matches a complete <glyph> element with the glyph-name
 ;; attribute value of NAME.  For example:
-- 
2.25.1

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to