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

SVG isn't really scalable #220

Open
bobspace opened this issue Feb 11, 2020 · 3 comments
Open

SVG isn't really scalable #220

bobspace opened this issue Feb 11, 2020 · 3 comments

Comments

@bobspace
Copy link

Looking at the SVG output produced by the toString method in my browser, the markup is a bunch of path segments rather than rects, so when you try to actually scale it it turns into a bunch of skinny lines far apart from one another instead of a bigger version of the same QR code.

Rendering in rects would be more verbose, but would be massively more useful and actually scale.

Here's an example output, scaled:
Screen Shot 2020-02-11 at 9 03 57 AM

@soldair
Copy link
Owner

soldair commented Feb 13, 2020

hey i would totally be ok with switching to rects. this was a contribution to begin with and im happy to accept another if you're willing.

@bobspace
Copy link
Author

That sounds fun! I'll take a crack at it.

@frudolph77
Copy link

frudolph77 commented Oct 28, 2020

Hello
i've a solution for this, at least there are two.

@bobspace At first one question: Where and how do you scale the svg?
e.g. When scaling in Inkscape you should enable the 'Scale Stroke Width' option

Possible solutions:

  1. The svg should also accept the scale option, just in the same way as the width option, it will scale up very well.
  2. Draw a closed rectangle instead of only lines and use fill instead of stroke for color. And I did not mean the rect tag.

I have both already locally, pull request will follow.

UPDATE:
for 1. see Pull request #247

Regards Frank

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

No branches or pull requests

3 participants