Back to API Reference
Class

UniTextFont.Core

Implements:IDisposable

Plain runtime for a font: owns face access, glyph tables, lookup dictionaries, curve cache and atlas pipeline. Constructable on worker threads (no Unity object lifecycle). Dispose instances constructed directly; a UniTextFont owns and disposes the runtime exposed by its asset.

Derived Types(1)

Types that inherit from UniTextFont.Core.

public byte[] FontData{ get }

Creates a managed snapshot of the complete raw font file.

public bool HasFontData{ get }
public int FontDataHash{ get }

Process-unique runtime identity, so distinct font sources and faces can never alias in shaping or atlas registries.

public int RawFontDataHash{ get }

Raw bytes-derived hash. Subclasses override to forward to their bytes source.

public FaceInfo FaceInfo{ get; set }
public int UnitsPerEm{ get; set }
public float FontScale{ get; set }
public bool ParticipatesInNormalization{ get; set }
public float ItalicStyle{ get; set }
public int SpacingOffset{ get; set }
public int SpaceAdvance{ get; set }
public float FakeBoldWeight{ get; set }
public string Name{ get; set }

Worker-thread-safe display name (mirrors CachedName).

public int AtlasPadding{ get }
public bool IsColor{ get }
public bool IsVariable{ get }
public Dictionary<long,Glyph> GlyphLookupTable{ get }

(varHash48, glyphIndex) → atlas-resident glyph. Lazy-built on first access.

[ctor]public Core()

Constructs an independently owned runtime from font bytes and the rendering settings normally supplied by the UniTextFont wrapper. The byte array is shared without copying and must not be modified while the runtime is alive. Safe to call from worker threads; the caller must dispose it.

public virtual byte[] CopyFontData()
public virtual int GetCachedInstanceId()
protected IntPtr EnsureFTFace()
protected void ReleaseFTFace()
public virtual UniTextFontError LoadFontFace()
public virtual void ReadFontDefinition()

Rebuilds the runtime glyph and character lookup tables.

public uint GetGlyphIndexForUnicode()
public void RegisterCharacterEntries()
public virtual bool HasGlyphInAtlas()

Returns whether the glyph has an entry in the selected distance-field atlas for this font's default variation.

protected List<uint> FilterNewGlyphs()
public virtual void ClearDynamicData()
public void InvokeChanged()
public virtual void Dispose()

Releases font faces, outline sources, curve caches, batch buffers, atlas entries and styled fallback clones, and unregisters from the live registry. Idempotent.