Back to API Reference
Struct

FontFamily

sealed

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

public string name

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

public UniTextFont primary

Primary font. 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, zh-Hant, ja, ko, en-US, 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 (e.g. Noto Sans SC/TC/JP/KR in one stack, or en-US print vs en-GB calligraphic). Leave empty for locale-agnostic families.