Back to API Reference
Class
UniTextFontStack
ScriptableObject container for font families with fallback chain support.
Remarks
Ordered list of font families. The first family's primary font is the primary font and provides strut metrics (line height, ascent, descent). Each family contains a primary font and optional faces (Bold, Italic, Variable, etc.). Face matching uses pre-computed lookup tables with CSS Fonts Level 4 §5.2 weight matching. Create via Assets menu: Create → UniText → Fonts
public UniTextFont PrimaryFont{ get }Gets the main (primary) font, or null if empty.
public bool TryGetFamilyByName(string name, FontFamily family)Looks up a family by its name across this stack and its fallback chain. Case-sensitive, first-wins.
public UniTextFont FindFontForCodepoint(uint unicode, HashSet<int> searched)Finds a font that can render the specified Unicode codepoint.
public UniTextFont FindFontForCodepoint(uint unicode, string preferredLanguage, HashSet<int> searched)Finds a font that can render the specified Unicode codepoint, preferring families whose preferredLanguage matches preferredLanguage.
public FontFamily[] familiesOrdered list of font families. First family's primary = MainFont (strut metrics).
public UniTextFontStack fallbackStackOptional fallback stack. Searched after this stack's own families.
