Back to API Reference
Class
UniTextFont
Font asset containing glyph data, metrics, and texture atlases for text rendering.
Remarks
UniTextFont is a ScriptableObject that stores: Font file data (TTF/OTF bytes) for FreeType rendering Face information (metrics, ascender, descender) Glyph table with metrics for text layout Glyph curve cache for SDF rendering Glyph curves are extracted at runtime when first needed and stored in a shared curve atlas.
Nested Types
public FaceInfo FaceInfo{ get; set }Gets or sets the font face information (metrics, ascender, descender, etc.).
public Dictionary<long,Glyph> GlyphLookupTable{ get }Gets the glyph lookup table (glyph key → Glyph).
protected IntPtr EnsureFTFace()public virtual UniTextFontError LoadFontFace()Loads the font face for glyph operations.
public void RegisterCharacterEntries(List<ValueTuple<uint,uint>> entries)Registers character-to-glyph mappings for later lookup.
protected List<uint> FilterNewGlyphs()Filters glyph indices, removing zeros and already-known glyphs. Returns a reusable list of unique indices to add, or null if nothing to add.
public static UniTextFont CreateFontAsset(byte[] fontBytes)Creates a new font asset from raw font file bytes.
