On 01/13/2014 04:16 PM, Werner LEMBERG wrote:
This seems to be fine, but no clue why:
inkscape --verb=EditSelectAllInAllLayers --verb=ObjectToPath
--verb=FileSave --verb=FileClose file.svg
./svgclip.py -o cropped.svg file.svg
where svgclip.py is here: https://github.com/skagedal/svgclip
I've followed that and uploaded a new version.
BTW, I recognized that the SVG contains (local) links to the .ly file;
did you remember to disable pointAndClick?
This time I did. :-)
Excellent. This also solves the blue-notes issue in Firefox for me, even
after clipping in Inkscape. So, to summarize for reference:
1.) For cropping,
inkscape --verb=FitCanvasToDrawing --verb=FileSave --verb=FileClose
file.svg
works, but has some caveats (probably for non-standard-conforming
viewers only, including Wikipedia's SVG-to-PNG-converter).
2.a) Firefox in some version(s) draws elements with links in blue if the
a tag does not specify another color.
2.b) Since Inkscape's FitCanvas rewrites the entire SVG and drops those
(seemingly superfluous) color attributes, you have to use a different
route with links: https://github.com/skagedal/svgclip
2.c) svgclip does not handle position of real text properly, hence you
have to convert to paths first.
inkscape --verb=EditSelectAllInAllLayers --verb=ObjectToPath
--verb=FileSave --verb=FileClose file.svg
./svgclip.py -o cropped.svg file.svg
That's the only universal variant we have for SVGs with links.
3.) Even without links, "real" text causes funny positions with
Wikipedia's PNG thumb renderer [1]. Hence,
inkscape --verb=EditSelectAllInAllLayers --verb=ObjectToPath
--verb=FitCanvasToDrawing --verb=FileSave --verb=FileClose file.svg
should be okay for SVGs with \pointAndClickOff, eliminating the need for
an additional tool.
Correct?
HTH,
Alexander
[1] Compare
https://upload.wikimedia.org/wikipedia/de/thumb/archive/4/4d/20140113150856%21Klavierst%C3%BCcke_%28Stockhausen%29_Nr2-Klavierst%C3%BCck2-Anfang.svg/500px-Klavierst%C3%BCcke_%28Stockhausen%29_Nr2-Klavierst%C3%BCck2-Anfang.svg.png
with text and
https://upload.wikimedia.org/wikipedia/de/thumb/4/4d/Klavierst%C3%BCcke_%28Stockhausen%29_Nr2-Klavierst%C3%BCck2-Anfang.svg/500px-Klavierst%C3%BCcke_%28Stockhausen%29_Nr2-Klavierst%C3%BCck2-Anfang.svg.png
with paths.
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel