Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set the xmlns attribute for outer svg when scaling #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dankessler
Copy link

Currently, when scaling, we wrap the content of the svg (which is xml) in something that looks like

<svg height=110%>
<g transform=scale(XX)>
VALID SVG HERE...
</g>
</svg>

However, in order to be "valid svg" we need to specify the namespace: xmlns="http://www.w3.org/svg".

I suspect that some svg rendering libraries are a bit forgiving of this, and you are working with a file with an extension that ends in .svg it will assume that's the namespace that you mean, but at least for me (emacs-mac on Mac OSX), things aren't so forgiving.

To my eye, scaling with height set to 110% looked a little weird, and it looked better with 100% scaling, so I also changed that.

Otherwise, what we get is not valid svg, and emacs won't render it

While we're at it, don't set the height to 110% (not clear why this was done in
the first place)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant