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.
This commit is contained in:
Michael Stapelberg
2020-11-07 13:20:39 +01:00
parent 11ded9c5ab
commit c63152fc39
7 changed files with 112 additions and 43 deletions

View File

@@ -14,4 +14,4 @@
package qrbill
//go:generate sh -c "go run third_party/goembed/goembed.go -package qrbill -var swisscross third_party/swiss-cross/CH-Kreuz_7mm/CH-Kreuz_7mm.png > GENERATED_swisscross.go && gofmt -w GENERATED_swisscross.go"
//go:generate sh -c "go run third_party/goembed/goembed.go -package qrbill -var swisscross third_party/swiss-cross/CH-Kreuz_7mm/CH-Kreuz_7mm.png third_party/swiss-cross/CH-Kreuz_7mm/CH-Kreuz_7mm.svg > GENERATED_swisscross.go && gofmt -w GENERATED_swisscross.go"