Skip to main content

blockworx_text/
lib.rs

1//! The text engine: shaping, line breaking and glyph outlines, with no
2//! toolkit and no browser under them.
3//!
4//! [`TextLayout`](blockworx_paint::TextLayout) is the one thing a drawing
5//! cannot do for itself, and the trait says it is the *host's* engine — so a
6//! host that has none, and an exporter run without one, need this: the
7//! [`Shaper`] lays a run out from the typeface's own bytes, and [`Outlines`]
8//! traces the glyphs it placed. Both are stated in the same metrics, so the
9//! ink lands where the layout said it would.
10
11mod cache;
12/// The headless canvas the suites above this crate drive: a [`Recording`](blockworx_paint::Recording)
13/// over the [`Shaper`], so what they measure is what a host would have
14/// measured. Behind a feature, the way `blockworx-doc`'s fixtures are, because
15/// `cfg(test)` stops at the crate line.
16#[cfg(any(test, feature = "test-support"))]
17pub mod measure;
18mod metrics;
19mod outline;
20mod rows;
21mod shaper;
22
23pub use metrics::Metrics;
24pub use outline::{FontPoint, Outlines, PathCommand};
25pub use shaper::Shaper;