#Yet Another QR code generator

1 messages · Page 1 of 1 (latest)

distant flare
#

Hello, made an Data Matrix and QR generator. The encoding is done in Rust, and the rendering in Typst itself, compared to others embedding an SVG. So if you ever wanted to use a Bee themed QR code that's possible with it 😄
And if not maybe the easy encoding options are useful for some 🙂
Wanted to implement Aztec and PDF417 encoding as well, but as there are no good options in Rust at the moment it has to wait until i need it, for the pain to include some C library ^^

https://typst.app/universe/package/zebra

astral raptor
#

I already took a look when your package PR came out. This looks really solid and thought-through, congratulations!

#

I wonder, how did you generates these graphics?

strange helm
#

What timing, I was just thinking of zebra name for such thing as well, but was afraid existing zebraw might be too similar :) Nicely done. Have you attempted any benchmarking against existing ones, and is there an advantage to using curve as opposed to something like grid?

distant flare
distant flare
#

curve has the advantage of a single path in svg and pdf export, so software draws it as "one thing", using a grid would be the same as drawing and placing the rectangles seperate from each other like the codetastic crate does, and that can result in these little gaps

#

for performance i havn't benchmarked it, but the tests.typ with a 100 codes and 4 quite large ones renders in under half a second, so it will be alright

strange helm
open saffron
#

Sick! I’d been looking for a qr library a while back and didn’t find any that were both fast and feature rich (in terms of exposing stuff from the crate).

This seems like the solution I’ll be using going forward!

supple widget
#

If all you want is black and white squares, the most performant solution is likely a bitmap

#

Unfortunately some pdf readers do not respect the image interpolation flag...

distant flare
#

yes, if pixelated rendering is supported an image with 1x1px per module is probably the smallest and fastest, but afaik not even the macos preview supports that (unfortunately for pixel art)

supple widget