Module glyph

Module glyph 

Source
Expand description

Processing and drawing glyphs.

StructsΒ§

BitmapGlyph
A glyph defined by a bitmap.
ColorGlyph
A glyph defined by a COLR glyph description.
Glyph
Positioned glyph.
GlyphCaches
Caches used for glyph rendering.
GlyphRun πŸ”’
A sequence of glyphs with shared rendering properties.
GlyphRunBuilder
A builder for configuring and drawing glyphs.
HintCache πŸ”’
LRU cache for hinting instances.
HintEntry πŸ”’
HintKey πŸ”’
OutlineCache πŸ”’
Caches glyph outlines for reuse. Heavily inspired by vello_encoding::glyph_cache.
OutlineCacheSession πŸ”’
OutlineEntry πŸ”’
OutlineGlyph
A glyph defined by a path (its outline) and a local transform.
OutlineKey πŸ”’
OutlinePath πŸ”’
PreparedGlyph
A simplified representation of a glyph, prepared for easy rendering.
PreparedGlyphRun πŸ”’
VarLookupKey πŸ”’
Lookup key for variable font caches.

EnumsΒ§

GlyphType
A type of glyph.
Style
Rendering style for glyphs.

ConstantsΒ§

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Β§

GlyphRenderer
Trait for types that can render glyphs.

FunctionsΒ§

find_hint_entry πŸ”’
prepare_bitmap_glyph πŸ”’
prepare_colr_glyph πŸ”’
prepare_glyph_run πŸ”’
Prepare a glyph run for rendering.
prepare_outline_glyph πŸ”’

Type AliasesΒ§

NormalizedCoord
A normalized variation coordinate (for variable fonts) in 2.14 fixed point format.
VarKey πŸ”’
Key for variable font caches.