typf-core 5.0.14

Core types and traits for the Typf text rendering pipeline
Documentation

Core traits and shared types for Typf.

This crate defines the common contract used by the rest of the Typf workspace: pipeline stages, shaping and rendering traits, shared error types, caches, and the data structures that move from one stage to the next.

Typf models text rendering as six conceptual steps:

  1. read input text,
  2. analyse script and direction,
  3. choose a font,
  4. shape characters into positioned glyphs,
  5. render those glyphs into pixels or vector data,
  6. export the result.

The default pipeline currently exposes the shaping, rendering, and export steps directly. The earlier stages still matter because other crates may use them for bidi resolution, text segmentation, or font fallback.

To extend Typf, implement one or more of these traits:

  • [Stage] for a general pipeline step,
  • [Shaper] for text shaping,
  • [Renderer] for glyph rendering,
  • [Exporter] for serialization,
  • [traits::FontRef] for access to font data.

Shared values passed between those steps live in [types].