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 ^^
#Yet Another QR code generator
1 messages · Page 1 of 1 (latest)
Shoutout to https://typst.app/universe/package/fancy-tiling/ for the fancy tilings used in the example 
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?
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?
Thank you 🙂
Here is the source code for it https://github.com/rojul/typst-zebra/blob/main/examples/readme-optimized-path.typ
Wanted to visualize what it does, so it reads what curve functions would have been called and draws little arrows
yeah, zebra is quite common for barcode generation software (zxing = zebra crossings, google old scanner from google)
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
Oh, indeed I can see them when I really zoom in on a grid
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!
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...
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)
preview is actually always the odd one out, so that doesn't surprise me