This function uses the WebFont.load method to load a specified Google Font by its name.
It resolves when the font is successfully loaded, and rejects if the font cannot be loaded.
Parameters
fontName: string
The name of the Google Font to load.
Returns Promise<void>
A promise that resolves when the font is successfully loaded, or logs an error if it fails.
Loads a Google Font asynchronously.
This function uses the
WebFont.loadmethod to load a specified Google Font by its name. It resolves when the font is successfully loaded, and rejects if the font cannot be loaded.