Expand description
Outlines from variable composites in VARC.
A variable composite glyph is a tree of components. Each component is a
transformed glyph drawn at its own location in the fontβs variation space,
and may itself be a composite. The leaves are glyphs from the fontβs base
outline source, glyf or CFF. They are drawn by the OutlineGlyphs
that produced the composite.
The working memory a VarcGlyph needs depends on its nesting depth and
its largest leaf. The tree is walked to measure them the first time the
size is needed, and the result is kept. Drawing splits that memory into
typed slices, as the glyf loader does, so a composite needs no memory
beyond that buffer.
StructsΒ§
- Draw
Context π - Data shared by every glyph in one draw.
- Glyph
Stack π - The composites being walked, outermost first, used to detect cycles.
- Layout π
- The size of a compositeβs working memory and how it is split.
- Leaves π
- Draws the leaves of a composite from the base source.
- Level π
- The runs for one level, with the remaining runs for the levels below it.
- Levels π
- The unused runs of coordinates and scalars.
- Measured π
- What measuring a compositeβs tree found, kept in atomics so an outline stays cheap to clone and safe to share.
- Memory π
- The working memory for one draw, split by a
Layout. - Outline π
- A glyph in the
VARCtable, with its working memory size computed. A composite glyph, ready to draw. - Outlines π
- Provides access to the variable composite glyphs in a font.
- Scalar
Cache π - The scalar for each region at one location, computed on first use.
- Scratch π
- Slices that each level uses in turn, and the number of edges left to walk.
- Varc
Glyph - A variable composite glyph from a
Font. - Walk π
- The state of a sizing walk.
ConstantsΒ§
- TRANSFORM_
FIELD_ πCOUNT - The maximum number of fields that one transform can vary.
TraitsΒ§
- Varc
Context π - Provides the data that
Outlines::drawneeds from outside the table.
FunctionsΒ§
- apply_
transform_ πvariations - axis_
values π - Writes the axis values of
componenttoout, one per axis index. - compute_
tuple_ πdeltas - Sums the deltas at
coordsfor the tuple identified byvar_idxintoout. - eval_
condition π - expand_
coords π - Copies
coordsintoout, which holds one value per axis. - linear_
scale π - Returns the factor that scales font units to
ppem. - scale_
matrix π - split π
- Splits
lenelements off the front ofslice, orNoneif it is too short.