tiny-skia

CPU raster rendering for Kit using tiny-skia

tiny-skia crate.

This package is intended to provide the deterministic software-rendering path

that kit-tea needs while kit-wgpu handles the primary GPU path. The first

API slice focuses on operations that map directly to iced-style renderer

primitives:

  • RGBA pixmaps
  • RGBA image blitting with source rectangles, scaling, opacity, and clipping
  • solid fills
  • clipped fills
  • rounded rectangles
  • per-corner rounded rectangles
  • vertical and horizontal gradients
  • stroked rounded rectangles
  • TrueType/OpenType font loading, shaping, coverage probes, font metrics, measurement, wrapping, and CPU text rasterization
  • pixel reads for parity tests

Text rendering currently uses rustybuzz shaping, fontdue glyph

rasterization, grapheme-cluster-aware overlong word splitting, and

whitespace-preserving wrapping. It now includes deterministic word wrapping for

shaped custom font text and exposes font-derived ascent, descent, line gap, and

line height for baseline-aware layout. Font coverage probes provide the

low-level primitive needed for fallback font selection. Bidirectional paragraph

layout, hyphenation, caching, and automatic fallback selection remain

higher-level work.

Native Build

The package builds a Rust cdylib with Cargo. Kit invokes

tools/build-native.sh through the package manifest when the native library is

needed.

kit task test