lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond SVG output in 2.12.1


From: Patrick McCarty
Subject: Re: Lilypond SVG output in 2.12.1
Date: Tue, 3 Feb 2009 13:34:03 -0800

On Tue, Feb 3, 2009 at 5:02 AM, Vivian Barty-Taylor
<address@hidden> wrote:
> A while ago, we got a sed script working to fix Lilypond svg output. Looking
> at the SVG output from 2.12.1 on OSX and using InkScape 0.45 all the grobs
> are incorrect. I don't have the problems mentioned by other users of missing
> bar lines, so I'll leave this issue.
>
> I investigated the svg file, and found that the unicode values of all grobs
> (a three digit, hexadecimal value) has been offset by 15. Thus a
> quarter-note NoteHead has a unicode value of 136 in Lilypond generated SVG,
> and this needs to be corrected to 127. A G-clef, which has a unicode value
> of 1a7 in Lilypond SVG needs to be corrected to 197. The previous
> corrections relating to font-names also need to be made - see thread
> http://lists.gnu.org/archive/html/lilypond-user/2007-09/msg00029.html
> (Lilypond incorrectly names Century Schoolbook and Emmentaler fonts.)

I can reproduce the font-naming issues, but I can't reproduce the
`off-by-15' issue.  I made a very simple LY file, generated SVG from
that, and double-checked all of the hexadecimal values.

Also to be completely accurate here, the hexadecimal values are *four*
digits.  For example, the G-clef has a hex value of e1a7.

> I've had a look at making this correction using a sed script, but can't find
> anything in the documentation relating to the handling of hexadecimal
> numbers. Does anyone have any ideas, before I write a script manually
> correcting each grob? Does anyone know where the SVG output is generated and
> in what language? I might be able to fiddle with the source code too, as it
> seems to be quite a straightforward adjustment.

Here are the workarounds for Inkscape 0.46 that I am using:

1) Move all of LilyPond's OTF fonts into ~/.fonts
2) Change all instances of `currentColor' to `#000' in the SVG file.
Apparently this is no longer an issue with latest Inkscape SVN.

After ungrouping everything, I can use the SVG file just fine.

-Patrick




reply via email to

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