Docsv2.12.12
Back to API Reference
Struct

FontFamily

sealed

A font family: primary font plus optional variant faces (Bold, Italic, Variable, etc.).

public string name

Optional identifier referenced by <font=...> rich-text tags. Case-sensitive; duplicates across a stack trigger a warning and first-wins lookup. Leave empty for families that should not be addressable by name.

public UniTextFont primary

Primary font asset. Provides strut metrics (if first family) and codepoint lookup.

public UniTextFont[] faces

Additional faces: Bold, Italic, BoldItalic, Variable, etc.

public string preferredLanguage

Optional BCP 47 language hint (e.g. zh-Hans, ja, en-GB). When a text run carries a matching language tag, this family is preferred during codepoint-to-font resolution. Use for single-stack multi-locale setups; leave empty for locale-agnostic families.