Docsv2.12.12
Back to API Reference
Class

UniTextFont.Core

Plain runtime for a font: holds FT face, glyph table, lookup dictionaries, curve cache, atlas pipeline. Constructable on worker threads (no Unity object lifecycle).

Derived Types(1)

Types that inherit from UniTextFont.Core.

public byte[] FontData{ get }

Raw font file bytes (already Zstd-decompressed).

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

Per-instance hash mixed with the runtime identity, so two Cores over the same bytes get independent atlas keys.

public int RawFontDataHash{ get }

Raw bytes-derived hash, before identity mixing. 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 a runtime from font bytes and the rendering settings normally supplied by the UniTextFont wrapper. Safe to call from worker threads.

public virtual int GetCachedInstanceId()
protected IntPtr EnsureFTFace()
protected void ReleaseFTFace()
public virtual UniTextFontError LoadFontFace()
public virtual void ReadFontAssetDefinition()
public uint GetGlyphIndexForUnicode()
public void RegisterCharacterEntries()
public bool HasGlyphInAtlas()
protected List<uint> FilterNewGlyphs()
public virtual long EstimateTileArea()

Total pixel area of all tiles in a rendered batch, used by the atlas to budget for atlas growth.

public virtual void ClearDynamicData()
public void InvokeChanged()
public virtual void Dispose()

Releases FT face, curve cache, batch buffers, atlas entries and styled fallback clones, and unregisters from the live registry. Idempotent.