ShapingCache Class

What shaping computes from a font alone, kept for the runs of a layout: the glyphs each lookup of its layout tables may apply at, the plan of the runs of each font and settings, and the advances a variable font computes from the outlines of its glyphs. A font has no cache of its own; the caller keeps this one as long as it wants, and uses it for one shaping at a time.

public sealed class ShapingCache

Constructors

NameDescription
ShapingCache()

ShapingCache()

ShapingCache.cs
public ShapingCache()

No documentation is available.

Methods

NameDescription
GetAdvanceWidth(FontFace, int)Gets the advance width of a glyph: kept for a font whose advances come from the outlines of its glyphs, where each one decodes the variations of the glyph.
Trim()Prepares the cache to be kept after a layout: the applier is dropped (it refers to the glyphs of the layout), and so are the plans of a font shaped with too many different settings.

GetAdvanceWidth(FontFace, int)

ShapingCache.cs

Gets the advance width of a glyph: kept for a font whose advances come from the outlines of its glyphs, where each one decodes the variations of the glyph.

public int GetAdvanceWidth(FontFace face, int glyph)

Parameters

face FontFace
glyph int

Returns

int

Prepares the cache to be kept after a layout: the applier is dropped (it refers to the glyphs of the layout), and so are the plans of a font shaped with too many different settings.

public void Trim()