read_fonts/tables/glyf/outline.rs
1//! Building outlines from `glyf` data.
2//!
3//! There are two entry points:
4//!
5//! - [`Outline`] owns its buffers and grows them as needed. A caller supplies
6//! a glyph and a size.
7//! - [`OutlinePlan`] allocates nothing. It walks the composite tree, reports
8//! how much space the result needs through [`buffer_lengths`], and
9//! [`load`s][load] into buffers the caller supplies. Use it to control where
10//! the memory comes from, or to supply a [`Hinter`].
11//!
12//! Both read through an [`OutlineContext`], which states the tables and the
13//! variation location. [`OutlineTables`] implements it by reading a font.
14//!
15//! A load produces an [`OutlineRef`], which borrows the caller's buffers.
16//!
17//! [`buffer_lengths`]: OutlinePlan::buffer_lengths
18//! [load]: OutlinePlan::load
19
20mod borrowed;
21mod buffers;
22mod context;
23mod hinter;
24mod load;
25mod owned;
26mod path;
27mod plan;
28mod scale;
29#[cfg(test)]
30mod testing;
31
32pub use borrowed::OutlineRef;
33pub use buffers::{BufferLengths, Buffers};
34pub use context::{OutlineContext, OutlineTables};
35pub use hinter::{GlyphZone, Hinter};
36pub use owned::Outline;
37pub use path::{contour_to_path, outline_to_path, PathContourStart};
38pub use plan::OutlinePlan;
39pub use scale::{Scale, Scale26Dot6, ScaleF32, Unscaled};