Commit Graph

4 Commits

Author SHA1 Message Date
Michael Stapelberg
f39a23b8dc switch to own SVG of the Swiss cross
Compared to the Adobe Illustrator-exported version from SIX,
this version is defined on a 166px x 166px viewbox,
which are the recommended dimensions with which the cross
should be overlaid on top of QR codes.

This versions visually matches the PNG version from SIX
when rendered onto the same pixel size (166px x 166px).

But, this version scales better!
The SIX version does not render correctly.
My guess is that it might have to do with their
use of floating point coordinates.
2020-11-10 23:39:48 +01:00
Michael Stapelberg
c63152fc39 re-implement SVG version from scratch
This implementation is using the bit matrix returned by zxing,
and then we do our own SVG rendering.

The SIX-supplied Swiss Cross SVG version is now used for the overlay.

The resulting SVG has been successfully tested in a number of different SVG
rendering engines:

• Google Chrome 86
• Firefox 82
• Emacs 26
• GIMP
• Inkscape
• Mobile Safari

When rendering the SVG onto 1265x1265 px at 600 dpi,
the resulting image matches the PNG version exactly.
2020-11-07 14:36:12 +01:00
Michael Stapelberg
041cd89d14 add boilerplate 2020-06-29 14:55:28 +02:00
Michael Stapelberg
f94dc9efc6 bundle swiss cross image file to avoid file system dependency 2020-06-29 14:45:44 +02:00