Repository navigation
v0.2.0
Performance
- Each layer is drawn as a single filled element instead of a full-canvas
rect clipped by aclipPath; all dots share one<path>.
PNG is 2–3x faster, and SVG output is about half the size. - System fonts load once per process, and only for SVGs containing text.
Small PDFs are about 13x faster. SvgRendererborrows options instead of cloning them, and the logo is
embedded once instead of twice.
Fixes
- Oversized
marginno longer panics. The builder returnsCanvasTooSmall. Color::from_hexno longer panics on non-ASCII input.- PNG/WebP keep transparent backgrounds; semi-transparent colors are no
longer darkened (premultiplied alpha). - Border text, style and image
srcare XML-escaped. - The logo area uses the image's real aspect ratio.
- Border decorations are emitted in a deterministic order.
- PNG output now renders border text (fonts were previously only loaded for PDF).
Features
QROptions::modeis now honored. An explicit mode encodes all data in
that mode and errors on unsupported characters.type_number > 40returnsInvalidVersion.- The
png,jpegandwebpfeatures now actually gate the encoders. - New default feature
pdf(PdfRenderer,OutputFormat::Pdf).
Breaking changes
QRDot::draw,QRCornerSquare::drawandQRCornerDot::drawreturn a
<path>element instead of<circle>/<rect>. Newpush_pathmethods
append raw path data.SvgRendererhas a lifetime parameter.SvgRenderer::from_refborrows
the options;SvgRenderer::newstill takes owned options.PdfRendererrequires thepdffeature (enabled by default).- SVG markup changed (no
clipPaths; coordinates rounded to 3 decimals).
Rendered output is visually identical.
Dependencies
resvg0.45 andsvg2pdf0.13 now share oneusvg/fontdb.- Removed the unused
tiny-skia,serde_jsonandproptest;lopdfis
now a dev-dependency.
Full changelog: 0ecaffb...v0.2.0