UniTextFont
Serialized font definition that owns face and rendering metadata and resolves its immutable source lazily. Embedded sources stay in the asset in the Editor and WebGL; other players resolve build-generated disk-backed sources. The Core materializes only when glyph or shaping work first needs this face.
Derived Types(3)
Types that inherit from UniTextFont.
Nested Types
public Core Runtime{ get }Lazy-built runtime that owns the FT face, glyph tables and atlas pipeline. First access after creation or source invalidation must occur on the main thread unless a provider has already captured the worker-safe slot.
public FaceInfo FaceInfo{ get; set }Font face metrics (ascender, descender, line height, etc.); their units per em is always UnitsPerEm.
Native pixel grid of a pixel-art font in pixels per em; 0 for a distance-field font. Glyphs of a pixel font rasterize once, one atlas texel per font pixel, and render with nearest sampling and hard edges; text sizes that are integer multiples of this value render pixel-exact.
public Dictionary<long,Glyph> GlyphLookupTable{ get }(varHash48, glyphIndex) → atlas-resident Glyph. Null until the font's lookup tables are built.
public virtual UniTextFontError LoadFontFace()Loads the underlying FreeType face. Returns the resulting error code, or Success if already loaded.
public static UniTextFont CreateFontAsset()Builds a runtime UniTextFont from font file bytes, taking FaceInfo, units-per-em and the pixel grid from face 0.
Builds a font asset of the given UniTextFont subtype from font file bytes, populating its source, hash, units-per-em and face metrics identically to CreateFontAsset.
