Takumi
Takumi renders UI component trees to images. This crate is the facade users
depend on: entry-point functions live at the crate root and the curated,
stable data structures live in [prelude]. Glob the prelude for the types
and call the functions from the crate root.
The backend crates expose a much larger surface than is meant for general use
— layout-engine glue, paint internals, and other cross-crate plumbing are
pub only because sibling crates need them. Those internals are deliberately
not re-exported here. If you need them, enable the unstable feature and
reach them through [unstable]; nothing under that module is covered by
semver.
Example
use *;
use render;
let node = container;
// Create a font context. Reuse it across renders to share the decode cache.
let mut fonts = default;
// Load fonts
fonts
.register
.unwrap;
let viewport = new;
let options = builder
.viewport
.node
.fonts
.build;
let image = render.unwrap;
Feature Flags
raster-backend(default): Enable the raster rendering backend.svg(default): Enable SVG image-source support in the core and raster backend.svg-backend: Enable the vector/SVG output backend ([render_svg]). Opt-in.woff2: Enable WOFF2 font support.woff: Enable WOFF font support.rayon: Enable rayon-based parallelism in the raster backend, whenraster-backendis also enabled.unstable: Re-export the backend crates wholesale under [unstable]. No semver guarantee. Opt-in.