Expand description
Processing and drawing glyphs.
StructsΒ§
- Cached
Outline π - A cached outline glyph path with its precise bounding box.
- Colr
Metrics π - Helper struct containing computed COLR glyph metrics.
- Draw
Props π - Properties for easily calculating the transform of a positioned glyph.
- Font
Embolden - Synthetic embolden settings for a glyph run.
- Font
Info π - Basic metadata about a font.
- Glyph
- Positioned glyph.
- Glyph
Bitmap π - A glyph defined by a bitmap.
- Glyph
Caches - Caches used for glyph rendering.
- Glyph
Colr - A glyph defined by a COLR glyph description.
- Glyph
Outline π - A glyph defined by a path (its outline) and a local transform.
- Glyph
Prep Cache - Caches used for preparing glyph drawing.
- Glyph
Prep Cache Mut - Mutably borrowed caches used for preparing glyph drawing.
- Glyph
Run - A sequence of glyphs with shared rendering properties.
- Glyph
RunBuilder - A builder for configuring and drawing glyphs.
- Glyph
RunRenderer - Helper struct for rendering a prepared glyph run.
- Glyph
Scale πProperties - Hint
Cache - LRU cache for hinting instances.
- Hint
Entry π - HintKey
- Hint key for hinting instances.
- Outline
Cache - Caches glyph outlines for reuse.
Heavily inspired by
vello_encoding::glyph_cache. - Outline
Cache πSession - Outline
Entry π - Outline
Key π - Outline
Path π - Prepared
Glyph π - A simplified representation of a glyph, prepared for easy rendering.
- Prepared
Glyph πRun - VarLookup
Key π - Lookup key for variable font caches.
EnumsΒ§
- Atlas
Cacher - Determines whether atlas-backed glyph caching is available for a draw.
- Cached
Glyph πType - Type hint for cached glyph rendering.
- Glyph
Type π - A type of glyph.
- Style π
- Rendering style for glyphs.
ConstantsΒ§
- BLACK_
PACKED π - Pre-packed
BLACKcolor as au32for use inGlyphCacheKey. - HINTING_
OPTIONS π - MAX_
CACHED_ πHINT_ INSTANCES - We keep this small to enable a simple LRU cache with a linear search. Regenerating hinting data is low to medium cost so itβs fine to redo it occasionally.
TraitsΒ§
- Font
Data πExt - Glyph
RunBackend - A backend for glyph run builders.
FunctionsΒ§
- calculate_
bitmap_ πtransform - Calculate transform for bitmap glyphs.
- calculate_
colr_ πmetrics - Calculate COLR glyph metrics (scale factors, bounding box, etc.).
- calculate_
colr_ πtransform - Calculate transform for COLR glyphs.
- calculate_
outline_ πtransform - Calculate transform for outline glyphs.
- create_
bitmap_ πglyph - Create bitmap glyph data.
- create_
colr_ πglyph - Create COLR glyph data with intermediate texture parameters.
- create_
outline_ πglyph - Create outline glyph data from cache.
- expand_
rect_ πwith_ segment - f32_
bits π - find_
hint_ πentry - insert_
and_ πmerge_ range - Insert a range into a sorted list, merging with any overlapping ranges.
- join_
bits π - prepare_
glyph_ πrun - Prepare a glyph run for rendering.
- x_
y_ πadvances
Type AliasesΒ§
- Normalized
Coord - A normalized variation coordinate (for variable fonts) in 2.14 fixed point format.
- VarKey π
- Key for variable font caches.