Expand description
Font representation.
Re-exportsยง
pub use blob::Blob;pub use format::Format;pub use source::Source;pub use tables::TableFunction;pub use tables::Tables;
Modulesยง
- blob ๐
- Blobs of font bytes.
- cache ๐
- Tables parsed once for a font and kept.
- format ๐
- Font format detection.
- source ๐
- Font data sources.
- tables ๐
- Table validation, caching and access.
Structsยง
- Feature
Vars ๐Storage - Lazy atomic storage for feature variation selections.
- Font
- A font at one location in its design space.
- Instance
Builder - Builder for configuring a font instance.
- Location
Caches ๐ - Caches for one location of a font of any kind.
- Sfnt
Caches ๐ - Caches for an SFNT font, with each table parsed once per font.
- Sfnt
Location ๐ - Caches for one location of an SFNT font.
- Shared
Font ๐ - The state every instance of a font shares.
- Shared
Font ๐Repr - Standalone
CffData ๐ - Type1
Data ๐ - A Type 1 font and the axes of its design space, if it has one.
- Varied
Instance ๐ - What a location away from the default carries.
- Varied
Sfnt ๐ - Caches for a varied SFNT instance.
- Varied
Type1 ๐ - A Type 1 multiple master font at a location.
Enumsยง
- Kind
- The underlying type of a font.
- Kind
Repr ๐ - The underlying type of a font.
- Repr ๐
- Varied
Kind ๐ - Caches for a varied instance, by font kind.
Constantsยง
- CACHED_
SUBFONTS ๐ - The number of CFF subfonts a font keeps once parsed. A subfont past them is parsed again whenever a glyph needs it.
- MAX_
INLINE_ ๐COORDS - Maximum number of coordinates we store inline. Chosen to maximize the
number of coords without growing the storage: a
SmallVecis a capacity alongside a union of the inline array and the heap pointer, so twelve two byte coords are the most that fit in 32 bytes. - MAX_
PRECOMPUTED_ ๐SCALARS - SOURCE_
ABSENT ๐ - The kept answer for a glyph source the font does not have.
- SOURCE_
PRESENT ๐ - The kept answer for a glyph source the font has.
Functionsยง
- cid_
table ๐ - Builds the table from each CID to its glyph, keeping the first glyph for a CID.
- clear_
if_ ๐all_ zeroes - Empties
coordsif every coordinate is zero. This lets the default instance skip variation processing behind a plainis_emptycheck. - named_
instance_ ๐variations - scalars_
with ๐ - Returns up to
MAX_PRECOMPUTED_SCALARSscalars fromcount, filled bycompute, which returns how many it wrote. - set_
variations ๐ - Helper for setting variations.
- store_
scalars ๐ - Returns the region scalars of
storeatcoords, or none without a store.
Type Aliasesยง
- Coord
Storage ๐ - Subfont
Cache ๐ - A cache of CFF subfonts at one location, each parsed when a glyph first needs it.