Makes a font available in the plugin for use when creating and modifying text. Calling this function is necessary to modify any property of a text node that may cause the rendered text to change, including
You can either pass in a hardcoded font, a font loaded via
listAvailableFontsAsync, or the font stored on an existing text node.
Read more about how to work with fonts, when to load them, and how to load them in the
loadFontAsync(fontName: FontName): Promise<void>
This function only works to load fonts already accessible in the Figma editor available to plugins. It does not load fonts from the internet.
Tip: to load multiple fonts at the same time, you may find Promise.all helpful.