open-standards/wai/wai-vector/src/lib.rs
Transaction Science 10ba6e9bcc wai-vector: the text layer and section 5, text and accessibility (D7-7)
graphics-vector.md section 5 (Draft): what a sink exposes to assistive
technology and to a text consumer, and how. Each text block's active set (the
effective windows of the items that draw it, merged), the projection at a
frame and the transcript as exact JSON, the text record and its digest, ruby,
purposes, writing modes and the cluster rule.

- wai-vector: src/text.rs (no_std, no dependency), the a11y and text commands,
  and vectors verify recomputing every text record.
- The corpus: a new a11y group, each payload with its text record
  (<name>.a11y.jsonl) and its digest in the expected file; canonical and
  refusal vectors for TEXT. No existing expected file changes.
- tests/text_layer.rs: each rule of section 5, with expected JSON written by
  hand from the text, each falsified once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 02:43:02 -04:00

57 lines
2.2 KiB
Rust
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! `wai.graphics.vector` (`extensions/graphics-vector.md`): titles, credits and other
//! authored graphics as integer drawing instructions, rasterised into an overlay
//! layer.
//!
//! - [`wos1`]: the outline set (§2.1), parsed with its load checks, and written.
//! - [`wvg1`]: the payload (§2.2–§2.5), parsed with the refusal order of §2.7, loaded
//! with its sets, and written canonically.
//! - [`clock`], [`track`], [`place`]: the clock, track evaluation, placement, the
//! load-time interval check and the per-frame cost (§3.1–§3.4).
//! - [`geom`], [`cover`], [`paint`]: the raster stage family RS1–RS9 (§3.5–§3.9,
//! §3.15): flattening, the row and cell split, accumulation and scan, coverage, the
//! glyph-wise union, compositing, groups and clips, and the straight-alpha view.
//! - [`frame`]: the frame procedure (§3.10), `RGBA8P` at a listed size, rate and frame.
//! - [`text`]: the text layer (§2.11, §5): `text_hash`, block identities, each block's
//! active set, and the projection and the transcript as JSON.
//! - [`arith`]: `R_rat`, `R_half_up`, `div255`, the quantisers and the straight-alpha
//! channel (§3.0, §3.8, §3.9, §2.9).
//! - [`scene`]: a builder that writes canonical payloads (authoring).
//! - [`wsf1`] (feature `author`): the stroke source format and its integer expansion
//! into a `WOS1` (Annex A).
//! - [`builtin`]: the default stroke set's bytes and digest (§4, Annex B), bundled with
//! every reference sink.
//! - [`form`]: the JSON authoring form (§2.12, informative).
//! - [`vectors`]: the conformance vectors of `../vector-conformance/`, generated and
//! recomputed.
//!
//! Every value is an exact integer. Nothing here uses floating point, wraps, or
//! depends on the target's word size.
#![no_std]
#![forbid(unsafe_code)]
extern crate alloc;
pub mod arith;
pub mod bounds;
pub mod builtin;
pub mod clock;
pub mod cover;
pub mod form;
pub mod frame;
pub mod geom;
pub mod json;
pub mod paint;
pub mod place;
pub mod refuse;
pub mod scene;
pub mod sha256;
pub mod text;
pub mod track;
pub mod vectors;
pub mod wos1;
#[cfg(feature = "author")]
pub mod wsf1;
pub mod wvg1;
pub use refuse::{Code, Refusal};
pub use wvg1::{Doc, Loaded, Resolver, SetStore, load, parse};