Giter Site home page Giter Site logo

Comments (9)

keremerkan avatar keremerkan commented on August 15, 2024 1

Just updated and checked. Opened the file in Adobe Illustrator for good measure. Works perfectly. Thanks!

from qrcode.

keremerkan avatar keremerkan commented on August 15, 2024 1

The app I used is called QR Pop. The developer seems to utilize your library very well.

BTW, I am adding your library to my app Qrafter which is probably the oldest QR Code app on App Store that still gets regular updates. I just rewrote it using Swift, and your library was the last piece to make it perfect. :) Thank you very much again for creating such an awesome tool.

from qrcode.

dagronf avatar dagronf commented on August 15, 2024 1

Always great to hear that. Thank you so much!

from qrcode.

dagronf avatar dagronf commented on August 15, 2024

Hey mate, sorry to hear you're having issues.

I can see the same issues when trying to open your svg on my machine here. Very odd!

I just tried making the same style of QR code that you're showing and exported it to SVG using this code...

func testIssue19ExportSVGIssue() throws {
   let d = QRCode.Document(utf8String: "This is a test")
   d.design.shape.eye = QRCode.EyeShape.RoundedOuter()
   d.design.shape.onPixels = QRCode.PixelShape.Circle()

   let str = d.svg(dimension: 600)
   try str.write(
      to: URL(fileURLWithPath: "/tmp/qrcode.svg"),
      atomically: true,
      encoding: .utf8
   )
}

which generated this file :-

qrcode

Interestingly, I can view this file correctly in Finder (quicklook), Firefox, Inkscape, Safari and Sketch... these are the apps that I was using to test SVG export.

Can you tell me the settings you're using to generate the QR Code? What pixel style, what eye style? Even better, can you share your code that you're using to create the qr code?

from qrcode.

dagronf avatar dagronf commented on August 15, 2024

Here's an exact replica of your QR Code in svg (down to the pixels) generated using the current version of the library...

qrcode19

It's very odd. I'm wondering whether there's some combination of settings which is triggering the issue

from qrcode.

dagronf avatar dagronf commented on August 15, 2024

Ah! Would you possibly be located in a country that uses ',' as the decimal separator?

Because I believe thats the issue with the SVG export. SVG expects '.' as the decimal separator - and I'm using a NumberFormatter to format the float values in the SVG export. The NumberSeparator always uses the Locale to determine the decimal separator, thus it uses ',' which breaks the svg output

Give me a moment...

from qrcode.

keremerkan avatar keremerkan commented on August 15, 2024

Hi Darren,

Yes, that's the exact problem. I just came here to write that to say that I found the issue and you are a step ahead of me. My region uses "," instead of "." and the svg was becoming corrupt because of that. I changed the region to US to verify the issue was fixed before even touching my code.

from qrcode.

dagronf avatar dagronf commented on August 15, 2024

@keremerkan Okey - I've pushed up a new version (13.10.0) which should fix the issue.

Would you mind checking out the new release and see if it fixes your issue please?

from qrcode.

dagronf avatar dagronf commented on August 15, 2024

Brilliant mate. Thank you for reporting it - so glad I can help out.

Apologies for the inconvenience.

Oh and btw. which program in the App Store is using the library? Would be interested in having a look...

from qrcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.