Skip to main content

Module font

Module font 

Source
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ยง

FeatureVarsStorage ๐Ÿ”’
Lazy atomic storage for feature variation selections.
Font
A font at one location in its design space.
InstanceBuilder
Builder for configuring a font instance.
LocationCaches ๐Ÿ”’
Caches for one location of a font of any kind.
SfntCaches ๐Ÿ”’
Caches for an SFNT font, with each table parsed once per font.
SfntLocation ๐Ÿ”’
Caches for one location of an SFNT font.
SharedFont ๐Ÿ”’
The state every instance of a font shares.
SharedFontRepr ๐Ÿ”’
StandaloneCffData ๐Ÿ”’
Type1Data ๐Ÿ”’
A Type 1 font and the axes of its design space, if it has one.
VariedInstance ๐Ÿ”’
What a location away from the default carries.
VariedSfnt ๐Ÿ”’
Caches for a varied SFNT instance.
VariedType1 ๐Ÿ”’
A Type 1 multiple master font at a location.

Enumsยง

Kind
The underlying type of a font.
KindRepr ๐Ÿ”’
The underlying type of a font.
Repr ๐Ÿ”’
VariedKind ๐Ÿ”’
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 SmallVec is 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 coords if every coordinate is zero. This lets the default instance skip variation processing behind a plain is_empty check.
named_instance_variations ๐Ÿ”’
scalars_with ๐Ÿ”’
Returns up to MAX_PRECOMPUTED_SCALARS scalars from count, filled by compute, which returns how many it wrote.
set_variations ๐Ÿ”’
Helper for setting variations.
store_scalars ๐Ÿ”’
Returns the region scalars of store at coords, or none without a store.

Type Aliasesยง

CoordStorage ๐Ÿ”’
SubfontCache ๐Ÿ”’
A cache of CFF subfonts at one location, each parsed when a glyph first needs it.