Docsv2.12.12
Back to API Reference
Class

EmojiFont

Inherits:Core

Color emoji runtime. Plain Core subclass — not a ScriptableObject. Singleton; auto-loads the platform's system emoji font on first Instance access.

public static bool Disabled{ get; set }

Global toggle for emoji rendering. Setting invalidates the codepoint cache and raises DisableChanged.

public int AtlasSize{ get }

Emoji atlas page side in pixels (square).

public int AtlasPadding{ get }
public bool IsColor{ get }
public static Material Material{ get }

Gets the shared material for emoji rendering.

public static EmojiFont Instance{ get }

Singleton emoji runtime. Auto-creates from the platform's system emoji font on first access. Returns null when Disabled is true.

public static bool IsAvailable{ get }

True if emoji rendering is available on this platform.

public int EmojiPixelSize{ get }

Pixel size at which emoji glyphs are rasterised.

public bool HasFontData{ get }
public int FontDataHash{ get }
public int RawFontDataHash{ get }
public byte[] FontData{ get }
public static void EnsureInitialized()

Forces eager creation of Instance and Material.

public static EmojiFont CreateFromPath()

Creates an emoji runtime from a font file path (.ttf,.ttc).

public static EmojiFont CreateFromData()

Creates an emoji runtime from raw font file bytes. Detects the colour format (sbix, CBDT, COLRv1) and picks the closest bitmap strike to pixelSize.

public override int GetCachedInstanceId()
public override UniTextFontError LoadFontFace()
public override long EstimateTileArea()
public override void ClearDynamicData()
public void DisposeFacePool()

Releases the FreeType face pool and COLRv1 renderer pool used for parallel glyph rendering. Call when the singleton is being torn down.

public static const int FontId

Reserved font ID for the emoji font (-1).

public static const int DefaultSize

Default emoji pixel size — 128 on desktop/mobile, 64 on WebGL.

public static Action DisableChanged

Raised when the Disabled property changes.