Last modified: 2014-07-15 03:29:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T49578, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47578 - Score should output SVG
Score should output SVG
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
Score (Other open bugs)
master
All All
: Normal enhancement with 2 votes (vote)
: ---
Assigned To: Brion Vibber
:
Depends on:
Blocks: 47444 47523
  Show dependency treegraph
 
Reported: 2013-04-23 22:14 UTC by Peter Gervai (grin)
Modified: 2014-07-15 03:29 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Peter Gervai (grin) 2013-04-23 22:14:21 UTC
Svg output would be nice as it could solve all complaints about transparent background (bug #47444) and rendering size (bug #47523).

It's as easy as
lilypond ... -dbackend=svg ...
and it's _not_ using ghostscript, which is a fantastic step towards world peace.
Comment 1 Sam Reed (reedy) 2013-04-23 22:28:21 UTC
What about the current --png parameter?

		$cmd = wfEscapeShellArg( $wgScoreLilyPond )
			. ' ' . wfEscapeShellArg( '-dsafe=#t' )
			. ' -dbackend=ps --png --header=texidoc '
			. wfEscapeShellArg( $factoryLy )
			. ' 2>&1';
Comment 2 Sam Reed (reedy) 2013-04-23 22:33:04 UTC
reedy@ubuntu64-web-esxi:~/git/mediawiki/core$ lilypond --h
Usage: lilypond [OPTION]... FILE...

Typeset music and/or produce MIDI from FILE.

LilyPond produces beautiful music notation.
For more information, see http://lilypond.org

Options:
  -d, --define-default=SYM[=VAL]      set Scheme option SYM to VAL (default: #t).
                                        Use -dhelp for help.
  -e, --evaluate=EXPR                 evaluate scheme code
  -f, --formats=FORMATs               dump FORMAT,...  Also as separate options:
      --pdf                           generate PDF (default)
      --png                           generate PNG
      --ps                            generate PostScript
  -h, --help                          show this help and exit
  -H, --header=FIELD                  dump header field FIELD to file
                                        named BASENAME.FIELD
  -I, --include=DIR                   add DIR to search path
  -i, --init=FILE                     use FILE as init file
  -j, --jail=USER, GROUP, JAIL, DIR   chroot to JAIL, become USER:GROUP
                                        and cd into DIR
  -o, --output=FILE                   write output to FILE (suffix will be added)
      --relocate                      relocate using directory of lilypond program
  -v, --version                       show version number and exit
  -V, --verbose                       be verbose
  -w, --warranty                      show warranty and copyright

Report bugs via http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs
Comment 3 Brion Vibber 2013-04-23 22:33:58 UTC
Well we'll need PNG for old browsers anyway so this'll need some fallback behavior...
Comment 4 Peter Gervai (grin) 2013-04-23 23:57:37 UTC
@reedy: simply drop it. try: 'reedy$ lilypond -dsafe=#t -dbackend=svg --header=texidoc whatever.ly'

(btw I believe you can drop texidoc as well, it's only required for eps)

@brion: Indeed, that's the main reason I didn't propose code fragment right away.
Comment 5 Brion Vibber 2013-05-04 19:24:01 UTC
Poking at this for a weekend quick hack project.
Comment 6 Brion Vibber 2013-05-04 19:56:27 UTC
Did a quick test here: https://gerrit.wikimedia.org/r/#/c/62243/

It's not quite working, at least on my MacBook the SVG files come out corrupt.
Comment 7 Brion Vibber 2013-05-04 22:57:44 UTC
Here's an alternate which allows for scaling up the PNG rendering for high-resolution, but doesn't do the fancy srcset stuff. This has the advantage of also looking cleaner in print, but may not scale down cleanly

https://gerrit.wikimedia.org/r/#/c/62313/
Comment 8 James Forrester 2013-05-05 00:23:03 UTC
SVG makes more sense, given the suggestion that we transition quite a bit MW's front-end imagery to SVG for the HiDPI and zooming benefits, and the increasingly-widespread support for and higher-quality rendering of them.
Comment 9 Brion Vibber 2013-05-05 15:24:20 UTC
Everybody seems to prefer the SVG idea, so I'll keep working on that. May require either patches to Lilypond or some file manipulation on our end to make things happy. :)
Comment 10 Jan Gerber 2013-07-24 10:00:11 UTC
https://gerrit.wikimedia.org/r/#/c/62243/ adds SVG support with png fallback, would be good to get it reviewed.
Comment 11 Gerrit Notification Bot 2014-07-15 03:29:15 UTC
Change 62243 had a related patch set uploaded by Ebe123:
Optional SVG mode with PNG fallback

https://gerrit.wikimedia.org/r/62243

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links