[Top][All Lists]

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

SVG output sponsorship

From: Vivian Barty-Taylor
Subject: SVG output sponsorship
Date: Sun, 12 Aug 2007 21:00:35 +0200

It seems to me that having reliable (bug-free) SVG output would be a big plus for Lilypond. At the present time, I have been unable to fix all the font problems (not sure whether this is Lilypond or Inkscape which is giving me trouble.) To get to where I am at I had to make a lot of changes by hand to the SVG file which is tedious. (Specifically, the italic sans-serif fonts still don't work.)

The main advantage of the SVG output (I would suggest) is that small changes to positions of objects can be done in a WYSIWYG environment, instead of the current estimate-how-much-I-have-to-move-that-object/ add line of code/ re-process score/ find out I haven't moved it enough/ moved it too much/ change values of #'padding or #'extra-offset etc. etc. all of which is time consuming especially with big projects.

While I'm a committed Lilyponder, and much prefer the output to other programs, this would seem to be a valuable investment in terms of user-friendliness. Could you give me an estimate of what this would cost, Han-Wen? Are there others who would be willing to co-sponsor this?


On Aug 11, 2007, at 7:53 PM, Erik Sandberg wrote:

On Sunday 08 July 2007, Benjamin Esham wrote:
Benjamin Esham wrote:
I'm having some issues with Lilypond 2.10.x's SVG export.

I seem to have fixed most (all?) of my font problems. I now have another
problem, however.

In order to submit one of LilyPond's SVGs to e.g. the Wikimedia Commons, it is necessary to convert all of its text into paths; that way, users need not have LilyPond's fonts in order to view the image correctly. Before converting text into paths in Inkscape, you must make sure that none of the text is contained within a group. Therefore, I started to process my file
by selecting everything and issuing an Ungroup command.

When I did so, the staff lines disappeared! Apparently every object in the
file is in a one-element group.  For some reason, ungrouping the staff
lines made them disappear—they were still present, just not visible. I think there may be an Inkscape bug at play here too, since "Select All" couldn't find the lines, but on the LilyPond end... how can I get Lily to
create a sane, usable SVG file?

Any help is greatly appreciated here.

There's another approach to the SVG output problem: You can take PDF or EPS
output from lilypond, and try to turn it into SVG files. The postscript
backend of lilypond is obviously more mature, and there exist converters from pdf/ps to svg. Free converters are a bit shaky, but for some lily versions I
managed to convert .ly files into valid SVG via a chain of converters.

Usually, you need to first expand fonts to curves using some ps2ps-like
script, and then use pstoedit to convert to something that can be converted to svg. Unfortunately, most conversion tools are rather immature, so you will need some experimenting to make it work. IIRC, I managed to generate valid svg with this method for my master's thesis, using a lilypond version around 2.6. I don't remember the exact combination of commands that worked though.

(I have vague memories that it may be good to start with pdf output and
convert it back to eps)

Here's a script that works for some subsets of ps (not lily's though), you can
look at it for ideas:

If you manage to find a fairly reliable path to convert the output of a recent
lily version into wikipedia-usable SVGs, I'd be happy to know.


lilypond-user mailing list

reply via email to

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