Back to API Reference
Class

GlyphAtlas

sealed
Inherits:GpuAtlas<GlyphEntry>

GPU-resident glyph tile cache over the GpuAtlas<TEntry> engine: Burst CPU rasterization directly into acquired GpuUploadSlot memory for SDF/MSDF glyphs, ready color pixels for emoji/color fonts. This class owns everything glyph-shaped — pad tiers, tile-size classification, the GlyphTransformTable rows, raster jobs — while storage, delivery, slots, eviction, compaction and recovery live in the engine. The atlas is a disposable cache: on AnyAtlasContentLost consumers re-collect from font data.

Nested Types

protected bool HasConsumerPendingWork{ get }
public static GlyphAtlas GetInstance()

Returns the process-wide atlas; GPU initialization remains deferred to the main thread.

public static long MakeKey()
public static long DefaultVarHash()

Computes default varHash48 for a non-variable font.

public static long ComputeVarHash48()

Computes varHash48 for a variable font with specific axis values. Uses FNV-1a to mix fontDataHash with axis values. Returns DefaultVarHash if axisValues is empty.

protected override void OnEntryDropped()
protected override void OnTilePlaced()
protected override void OnRemoveSweep()
protected override void OnAtlasStateCleared()
protected override void OnCompactionRelocated()
public override void Dispose()
protected override bool FlushPendingWork()
public static const float Pad

SDF distance scale: the atlas stores signed distance in em, clamped to ±this, and effect widths convert em→field units through it (the shader's DILATE_SCALE). NOT the tile rim — see TileFitPad.

public static const float TileFitPad

Tight-fit rim for an effect-free glyph, in glyph-height units — pad tier 0 (see PadTierToNorm). Small enough that the glyph nearly fills its tile, large enough for edge AA (must exceed the face SDF padding). Effects grow the tier per-glyph via re-rasterization, up to the full Pad/glyphH spread.