On Sat, May 4, 2013 at 6:48 PM, Rob Lanphier robla@wikimedia.org wrote:
There's two avenues I'm exploring:
- https://gerrit.wikimedia.org/r/#/c/62243/ - outputs SVG instead of PNG
In theory, SVGs will scale cleanly to any screen or print resolution; but some older browsers (IE < 9 and Android < 3) won't display them.
Unfortunately I'm getting totally corrupted SVG output on my MacBook with Lilypond 2.16.2. On my Ubuntu 12.04 machine with 2.14.something I get complete-looking SVGs, but they're missing the XML namespace and so won't render.
Bummer. This is an avenue Jan Gerber is exploring as part of figuring out bug 47826: https://bugzilla.wikimedia.org/47826
De-bummerize, sir! Turns out the SVGs as they come out of Lilypond are fine -- they were being corrupted by ImageMagick, which is invoked by default to trim the full-page output images down to just the size of their content. (Workaround for now: set $wgScoreTrim = false in LocalSettings along with the $wgScoreUseSVG = true.)
So, on the plus side: SVG output actually works! On the minus side: the SVGs are really tall, because they're full-page-size.
I don't see any options on Lilypond to automatically trim output size, so we'd either have to figure out how to do it ourselves with a little XML manipulation or add an option... Lilypond is a scary mix of C++, Python, and Scheme code, so.... ick. :)
-- brion