Function: preloadTextFont()
ts
function preloadTextFont(options): Promise<void>;Experimental
Load a font and pre-generate glyph SDFs (e.g. digits for tick labels) so the first frame with text does not stall. Resolves the family through the font registry, else the default font (no family: the default font's face for the weight and style). Loads the text engine and the default font face first if needed.
Parameters
| Parameter | Type |
|---|---|
options | { characters?: string | string[]; family?: string; style?: TextFontStyle; weight?: TextFontWeight; } |
options.characters? | string | string[] |
options.family? | string |
options.style? | TextFontStyle |
options.weight? | TextFontWeight |
Returns
Promise<void>