v1.2.0
What's New
SVG Rasterization & Inline SVGs
- SVG data URIs in
<img>tags now render in PNG and JPEG output (previously SVG-only) - Inline
<svg>elements are fully supported in all output formats - Minimal SVG rasterizer with path, rect, circle, ellipse, polygon, stroke, and translate transform support
- Even-odd fill rule via sub-path XOR compositing
Gradient Rendering Overhaul
- Fixed gradient direction (was reversed vs CSS spec in PNG/JPEG)
- Linear RGB color interpolation with ordered dithering eliminates visible banding
- SVG gradients now use
color-interpolation="linearRGB"to match PNG output
Tailwind Gradient Utilities
bg-gradient-to-{t,tr,r,br,b,bl,l,tl}direction classesfrom-*,via-*,to-*gradient stop color classes- Composes into
background-image: linear-gradient(...)automatically
PNG/JPEG Rendering Fixes
- Fixed premultiplied alpha compositing — eliminates bright-edge artifacts on semi-transparent rounded rects
- Sub-pixel text positioning for better SVG/PNG parity
- 2x supersampled rounded corner masks for smoother curves
- Rounded borders now clip through the mask (fixes angular corners on small elements)
- RTL text shaping in PNG via ShapedTextToPath + vector.Rasterizer
- 4:4:4 chroma JPEG encoder prevents color shifts on dark backgrounds
Other Fixes
- HTML
width/heightattributes now map to CSS styles (like browsers) font-familyCSS parsing correctly extracts first family from comma-separated fallback lists- Open SVG subpaths implicitly closed for fill operations
Docs & Site
- Shared template constants between playground and examples
- Fullscreen image viewer with zoom, pan, and SVG/PNG/JPEG format switching
- New RTL (Arabic) and Tailwind gradient examples
- Fixed dependency claims —
go-text/typesettingnow listed - Rate limit warning on playground
- curl example in rendering guide
Full Changelog: v1.1.0...v1.2.0