Re: rsvg-view can't display SVG files created by lilypond
>>> Attached is an example, the instrument name Violin at the start of >>> a staff. By changing the font size down it gets worse, so it >>> seems to be the bug you are talking about. >> >> Yes. I suspect that kern values are scaled (and applied) incorrectly. > > From what it's worth, I've filed a librsvg bug report a few days ago > marked as `critical', without any reply so far. Sigh... > > https://bugzilla.gnome.org/show_bug.cgi?id=767481 After contacting a librsvg developer by e-mail, I finally got a reaction. To summarize: It's not a librsvg bug. On my platform it was a too old version of Pango that caused the bad kerning while displaying SVG files with tools from librsvg (Pango 1.36.8: bad, Pango 1.40.1: OK). A relevant Wikimedia bug report is https://phabricator.wikimedia.org/T40010 Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
>> Attached is an example, the instrument name Violin at the start of >> a staff. By changing the font size down it gets worse, so it seems >> to be the bug you are talking about. > > Yes. I suspect that kern values are scaled (and applied) incorrectly. Fro what it's worth, I've filed a librsvg bug report a few days ago marked as `critical', without any reply so far. Sigh... https://bugzilla.gnome.org/show_bug.cgi?id=767481 Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
> Attached is an example, the instrument name Violin at the start of a > staff. By changing the font size down it gets worse, so it seems to > be the bug you are talking about. Yes. I suspect that kern values are scaled (and applied) incorrectly. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
On Thu, 2016-06-09 at 14:18 +0200, Werner LEMBERG wrote: > >> Well, we are not in the market for SVG compliance testing. If > >> there are reasonably simple changes we can make to LilyPond in > >> order to avoid/sidestep triggering this librsvg bug, > > > > I don't know about *this* bug, > > BTW, can you reproduce the problem that I've shown in my previous > e-mail? Well, I don't seem to have rsvg-view with my librsvg package (from Debian) but after a bit of a fight I managed to get Denemo to load the svg image you posted as an icon for a palette button (this is rendered with librsvg) and it rendered ok. I don't know what scaling is being done for that though, but I certainly see mangled text when rendering LilyPond generated SVG with this version of librsvg. Attached is an example, the instrument name Violin at the start of a staff. By changing the font size down it gets worse, so it seems to be the bug you are talking about. Richard ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
On Thu, 2016-06-09 at 14:20 +0200, David Kastrup wrote: > Richard Shannwrites: > > > On Thu, 2016-06-09 at 13:23 +0200, David Kastrup wrote: > >> Richard Shann writes: > >> > >> > I don't know about *this* bug, but I did test out replacing > >> > currentColor with "black" (in quotes) in the LilyPond source code > >> > and it worked fine; that seems to me not only a simple but also a > >> > fairly sensible change. > >> > >> Except that it would make it impossible to draw in colors other than > >> black. That was the rationale for using currentColor in the first > >> place. > > > > Oh, if that is the case then I'm misremembering - I thought I found > > that explicitly set colors over-rode the value currentColor (or > > "black" or whatever you put at that place in the code). > > What is "that place"? > dak@lola:/usr/local/tmp/lilypond$ git grep currentColor > Documentation/misc/ChangeLog-2.10: change black to currentColor > everywhere. This fixes color support > scm/output-svg.scm: (set-attribute 'fill "currentColor")) yes "that place" was output-svg.scm, I just did a replace in document command IIRC, but I didn't notice the entry in the ChangeLog which indicates that there is some purpose behind using "currentColor". My problem was I didn't seem to be able to control what colors librsvg chose, and it chose to make it white. Richard ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
>> Mhmm, `damage' is too big a word IMHO. This problem is already >> fixed in the latest release of librsvg (and it wasn't present in >> some earlier versions about a year ago; at least I was able to >> submit an SVG to Wikipedia without any problems), and I believe >> that at least Wikipedia will update within the next few months. > > So a half-year outage of LilyPond on Wikipedia and a messup of > Denemo and a number of other applications is not "damage". I guess that with a new non-developer lilypond release the problems with Wikipedia are already solved. Up to now it seems that noone has noticed the problem with lilypond at all – I was the first who has reported this here, it seems... BTW, already uploaded files to Wikipedia are usually not an issue, since (a) the browsers that display SVGs directly are not affected, and (b) the SVGtoPNG conversion on Wikipedia worked fine also until a librsvg update broke this a few months ago. Of course I don't object to a sensible solution, if you have one. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
Werner LEMBERGwrites: It would seem like a better idea to explicitly establish a documentwide default of currentColor to black explicitly somewhere. >>> >>> Perhaps a `-dxxx' command-line option? >> >> Anything requiring explicit user effort in order to produce expected >> results is not going to mitigate the damage. > > Mhmm, `damage' is too big a word IMHO. This problem is already fixed > in the latest release of librsvg (and it wasn't present in some > earlier versions about a year ago; at least I was able to submit an > SVG to Wikipedia without any problems), and I believe that at least > Wikipedia will update within the next few months. So a half-year outage of LilyPond on Wikipedia and a messup of Denemo and a number of other applications is not "damage". > The current default of Lilypond is not wrong, as far as I can see. Shrug. It doesn't matter whether we can nominally justify calling this "somebody else's problem". The fallout still piles up in our backyard. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
>>> It would seem like a better idea to explicitly establish a >>> documentwide default of currentColor to black explicitly >>> somewhere. >> >> Perhaps a `-dxxx' command-line option? > > Anything requiring explicit user effort in order to produce expected > results is not going to mitigate the damage. Mhmm, `damage' is too big a word IMHO. This problem is already fixed in the latest release of librsvg (and it wasn't present in some earlier versions about a year ago; at least I was able to submit an SVG to Wikipedia without any problems), and I believe that at least Wikipedia will update within the next few months. The current default of Lilypond is not wrong, as far as I can see. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
Werner LEMBERGwrites: >> It would seem like a better idea to explicitly establish a >> documentwide default of currentColor to black explicitly somewhere. > > Perhaps a `-dxxx' command-line option? Anything requiring explicit user effort in order to produce expected results is not going to mitigate the damage. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
Richard Shannwrites: > On Thu, 2016-06-09 at 13:23 +0200, David Kastrup wrote: >> Richard Shann writes: >> >> > I don't know about *this* bug, but I did test out replacing >> > currentColor with "black" (in quotes) in the LilyPond source code >> > and it worked fine; that seems to me not only a simple but also a >> > fairly sensible change. >> >> Except that it would make it impossible to draw in colors other than >> black. That was the rationale for using currentColor in the first >> place. > > Oh, if that is the case then I'm misremembering - I thought I found > that explicitly set colors over-rode the value currentColor (or > "black" or whatever you put at that place in the code). What is "that place"? dak@lola:/usr/local/tmp/lilypond$ git grep currentColor Documentation/misc/ChangeLog-2.10: change black to currentColor everywhere. This fixes color support scm/output-svg.scm: (set-attribute 'fill "currentColor")) scm/output-svg.scm: (set-attribute 'fill "currentColor") scm/output-svg.scm: `(fill . ,(if is-filled "currentColor" "none")) scm/output-svg.scm: `(stroke . "currentColor") scm/output-svg.scm:(stroke . "currentColor") scm/output-svg.scm: `(fill . ,(if is-filled "currentColor" "none")) scm/output-svg.scm: `(stroke . "currentColor") scm/output-svg.scm: `(fill . ,(if fill "currentColor" "none")) scm/output-svg.scm: `(stroke . "currentColor") scm/output-svg.scm: `(fill . ,(if fill "currentColor" "none")) scm/output-svg.scm: `(stroke . "currentColor") scm/output-svg.scm:'(stroke . "currentColor") scm/output-svg.scm:`(fill . ,(if fill? "currentColor" "none")) scm/output-svg.scm: `(fill . ,(if is-filled "currentColor" "none")) scm/output-svg.scm: '(stroke . "currentColor") scm/output-svg.scm: '(fill . "currentColor"))) -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
> It would seem like a better idea to explicitly establish a > documentwide default of currentColor to black explicitly somewhere. Perhaps a `-dxxx' command-line option? Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
>> Well, we are not in the market for SVG compliance testing. If >> there are reasonably simple changes we can make to LilyPond in >> order to avoid/sidestep triggering this librsvg bug, > > I don't know about *this* bug, BTW, can you reproduce the problem that I've shown in my previous e-mail? Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
On Thu, 2016-06-09 at 13:23 +0200, David Kastrup wrote: > Richard Shannwrites: > > > On Thu, 2016-06-09 at 12:57 +0200, David Kastrup wrote: > >> Werner LEMBERG writes: > >> > >> >>> >> However, there's still a nasty scaling bug that completely ruins > >> >>> >> text positioning at larger magnification values. Sigh. > >> >>> > > >> >>> > Is *this* a bug in librsvg, or another LilyPond output problem? > >> >>> > >> >>> It's definitely a bug in librsvg AFAICS, cf. > >> >>> > >> >>> https://phabricator.wikimedia.org/T65703 > >> >> > >> >> I see on this page that there is a mention of "Fixed in 2.40.13" > >> > > >> > I think this is only partially correct, cf. > >> > > >> > https://phabricator.wikimedia.org/T65703#1981688 > >> > > >> >> Do you happen to know if we could usefully upgrade Denemo to use > >> >> librsvg 2.40.13 (it always involves quite a bit of work upgrading > >> >> versions so I thought I'd ask first) > >> > > >> > Sorry, I can't help here. Regarding librsvg, I'm an ordinary user, > >> > not acquainted with SVG at all. > >> > >> Well, we are not in the market for SVG compliance testing. If there are > >> reasonably simple changes we can make to LilyPond in order to > >> avoid/sidestep triggering this librsvg bug, > > > > I don't know about *this* bug, but I did test out replacing currentColor > > with "black" (in quotes) in the LilyPond source code and it worked fine; > > that seems to me not only a simple but also a fairly sensible change. > > Except that it would make it impossible to draw in colors other than > black. That was the rationale for using currentColor in the first > place. Oh, if that is the case then I'm misremembering - I thought I found that explicitly set colors over-rode the value currentColor (or "black" or whatever you put at that place in the code). Richard ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
Richard Shannwrites: > On Thu, 2016-06-09 at 12:57 +0200, David Kastrup wrote: >> Werner LEMBERG writes: >> >> >>> >> However, there's still a nasty scaling bug that completely ruins >> >>> >> text positioning at larger magnification values. Sigh. >> >>> > >> >>> > Is *this* a bug in librsvg, or another LilyPond output problem? >> >>> >> >>> It's definitely a bug in librsvg AFAICS, cf. >> >>> >> >>> https://phabricator.wikimedia.org/T65703 >> >> >> >> I see on this page that there is a mention of "Fixed in 2.40.13" >> > >> > I think this is only partially correct, cf. >> > >> > https://phabricator.wikimedia.org/T65703#1981688 >> > >> >> Do you happen to know if we could usefully upgrade Denemo to use >> >> librsvg 2.40.13 (it always involves quite a bit of work upgrading >> >> versions so I thought I'd ask first) >> > >> > Sorry, I can't help here. Regarding librsvg, I'm an ordinary user, >> > not acquainted with SVG at all. >> >> Well, we are not in the market for SVG compliance testing. If there are >> reasonably simple changes we can make to LilyPond in order to >> avoid/sidestep triggering this librsvg bug, > > I don't know about *this* bug, but I did test out replacing currentColor > with "black" (in quotes) in the LilyPond source code and it worked fine; > that seems to me not only a simple but also a fairly sensible change. Except that it would make it impossible to draw in colors other than black. That was the rationale for using currentColor in the first place. It would seem like a better idea to explicitly establish a documentwide default of currentColor to black explicitly somewhere. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
On Thu, 2016-06-09 at 12:57 +0200, David Kastrup wrote: > Werner LEMBERGwrites: > > >>> >> However, there's still a nasty scaling bug that completely ruins > >>> >> text positioning at larger magnification values. Sigh. > >>> > > >>> > Is *this* a bug in librsvg, or another LilyPond output problem? > >>> > >>> It's definitely a bug in librsvg AFAICS, cf. > >>> > >>> https://phabricator.wikimedia.org/T65703 > >> > >> I see on this page that there is a mention of "Fixed in 2.40.13" > > > > I think this is only partially correct, cf. > > > > https://phabricator.wikimedia.org/T65703#1981688 > > > >> Do you happen to know if we could usefully upgrade Denemo to use > >> librsvg 2.40.13 (it always involves quite a bit of work upgrading > >> versions so I thought I'd ask first) > > > > Sorry, I can't help here. Regarding librsvg, I'm an ordinary user, > > not acquainted with SVG at all. > > Well, we are not in the market for SVG compliance testing. If there are > reasonably simple changes we can make to LilyPond in order to > avoid/sidestep triggering this librsvg bug, I don't know about *this* bug, but I did test out replacing currentColor with "black" (in quotes) in the LilyPond source code and it worked fine; that seems to me not only a simple but also a fairly sensible change. Richard ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
Werner LEMBERGwrites: >>> >> However, there's still a nasty scaling bug that completely ruins >>> >> text positioning at larger magnification values. Sigh. >>> > >>> > Is *this* a bug in librsvg, or another LilyPond output problem? >>> >>> It's definitely a bug in librsvg AFAICS, cf. >>> >>> https://phabricator.wikimedia.org/T65703 >> >> I see on this page that there is a mention of "Fixed in 2.40.13" > > I think this is only partially correct, cf. > > https://phabricator.wikimedia.org/T65703#1981688 > >> Do you happen to know if we could usefully upgrade Denemo to use >> librsvg 2.40.13 (it always involves quite a bit of work upgrading >> versions so I thought I'd ask first) > > Sorry, I can't help here. Regarding librsvg, I'm an ordinary user, > not acquainted with SVG at all. Well, we are not in the market for SVG compliance testing. If there are reasonably simple changes we can make to LilyPond in order to avoid/sidestep triggering this librsvg bug, then we'll save ourselves a lot of trouble by just doing some change on our side. Blame-shifting tends up to be a lot of work and hassle with _our_ users, never mind that technically we are not at fault at all. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
>> >> However, there's still a nasty scaling bug that completely ruins >> >> text positioning at larger magnification values. Sigh. >> > >> > Is *this* a bug in librsvg, or another LilyPond output problem? >> >> It's definitely a bug in librsvg AFAICS, cf. >> >> https://phabricator.wikimedia.org/T65703 > > I see on this page that there is a mention of "Fixed in 2.40.13" I think this is only partially correct, cf. https://phabricator.wikimedia.org/T65703#1981688 > Do you happen to know if we could usefully upgrade Denemo to use > librsvg 2.40.13 (it always involves quite a bit of work upgrading > versions so I thought I'd ask first) Sorry, I can't help here. Regarding librsvg, I'm an ordinary user, not acquainted with SVG at all. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
On Thu, 2016-06-09 at 10:15 +0200, Werner LEMBERG wrote: > >> However, there's still a nasty scaling bug that completely ruins > >> text positioning at larger magnification values. Sigh. > > > > Is *this* a bug in librsvg, or another LilyPond output problem? > > It's definitely a bug in librsvg AFAICS, cf. > > https://phabricator.wikimedia.org/T65703 I see on this page that there is a mention of "Fixed in 2.40.13" however this page https://www.mirrorservice.org/sites/ftp.gnome.org/pub/GNOME/sources/librsvg/2.40/librsvg-2.40.13.changes makes no mention of it. Do you happen to know if we could usefully upgrade Denemo to use librsvg 2.40.13 (it always involves quite a bit of work upgrading versions so I thought I'd ask first) Richard ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
>> However, there's still a nasty scaling bug that completely ruins >> text positioning at larger magnification values. Sigh. > > Is *this* a bug in librsvg, or another LilyPond output problem? It's definitely a bug in librsvg AFAICS, cf. https://phabricator.wikimedia.org/T65703 Have a look at the mentioned file: https://upload.wikimedia.org/wikipedia/commons/9/96/Ikaros_solar_sail_key.svg Then simply magnify it with rsvg-view and look what happens with the word `Tethers'. I consider this a very fundamental bug. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
On Wed, 2016-06-08 at 23:44 +0200, Werner LEMBERG wrote: > > A quick glance at my code suggests that > > > > \applyContext #(override-color-for-all-grobs (x11-color 'black) > > > > will work as a workaround if uploading to Wikipedia. > > Indeed, that works, thanks! > > However, there's still a nasty scaling bug that completely ruins text > positioning at larger magnification values. Sigh. Is *this* a bug in librsvg, or another LilyPond output problem? I didn't look deeply into that - I think I asked here, but I don't recall getting a clear response... Richard ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
> A quick glance at my code suggests that > > \applyContext #(override-color-for-all-grobs (x11-color 'black) > > will work as a workaround if uploading to Wikipedia. Indeed, that works, thanks! However, there's still a nasty scaling bug that completely ruins text positioning at larger magnification values. Sigh. Why on earth has Wikipedia selected this buggy rsvg library? Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
On Wed, 2016-06-08 at 18:08 +0200, Federico Bruni wrote: > EyeOfGnome and Gimp - which use librsvg just like rsvg-view - do not > display anything. > > The problem is: > > fill="currentColor" This use by LilyPond's SVG output of "currentColor" is something I ran up against when rendering LilyPond's SVG from Denemo. I could not find any way of making sure that currentColor didn't come out the same as the background color, so that nothing was seen. I resorted to the LilyPond code that specifies that the color of all grobs is "black" and then all was well. A quick glance at my code suggests that \applyContext #(override-color-for-all-grobs (x11-color 'black) will work as a workaround if uploading to Wikipedia. Would it be a good idea simply to change LilyPond's output, since "currentColor" seems problematic - LilyPond could use "black" unless it got overridden by the LilyPond user. Richard ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
Il giorno mer 8 giu 2016 alle 18:08, Federico Bruniha scritto: I guess that it's some bug of librsvg? I tried the easiest example: \version "2.19.42" \paper { tagline = ##f } \markup "Hello World" which produces: http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink; version="1.2" width="210.00mm" height="297.00mm" viewBox="0 0 119.5016 169.0094"> font-size="2.2001" text-anchor="start" fill="currentColor"> font-size="2.2001" text-anchor="start" fill="currentColor"> Hello World EyeOfGnome and Gimp - which use librsvg just like rsvg-view - do not display anything. The problem is: fill="currentColor" Fixed in version 2.40.16: https://bugzilla.gnome.org/show_bug.cgi?id=764808 ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rsvg-view can't display SVG files created by lilypond
Il giorno mer 8 giu 2016 alle 14:55, Werner LEMBERGha scritto: [lilypond 2.19.43] I'm running rsvg-view version 2.40.15, and it can't display any SVG file created by lilypond. Is this a known issue? In particular, I can't successfully upload lilypond output to Wikipedia, which uses the rsvg library... On the other hand, Firefox and inkview work just fine... Yes, I confirm it. (did you mean Inkscape?) I guess that it's some bug of librsvg? I tried the easiest example: \version "2.19.42" \paper { tagline = ##f } \markup "Hello World" which produces: http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink; version="1.2" width="210.00mm" height="297.00mm" viewBox="0 0 119.5016 169.0094"> font-size="2.2001" text-anchor="start" fill="currentColor"> font-size="2.2001" text-anchor="start" fill="currentColor"> Hello World EyeOfGnome and Gimp - which use librsvg just like rsvg-view - do not display anything. The problem is: fill="currentColor" ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
rsvg-view can't display SVG files created by lilypond
[lilypond 2.19.43] I'm running rsvg-view version 2.40.15, and it can't display any SVG file created by lilypond. Is this a known issue? In particular, I can't successfully upload lilypond output to Wikipedia, which uses the rsvg library... On the other hand, Firefox and inkview work just fine... Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel