Class: Fonts
The Fonts class provides methods to work with fonts.
Extends
unknown
Constructors
Constructor
new Fonts(): Fonts;
Returns
Fonts
Inherited from
ProxyLiveObject.constructor
Methods
fromPostscriptName()
fromPostscriptName(postscriptName): Promise<AvailableFont | undefined>;
Get an AvailableFont that exactly matches the given PostScript name, if any. Only fonts that the user has permission to use for editing content are returned, so the result of this call is always safe to apply to a TextContentModel's styles.
Parameters
Parameter
Type
Description
postscriptNamestringThe PostScript name of the font.
Returns
Promise<AvailableFont | undefined>
The Font object if found and available for editing, otherwise undefined.