registerFont abstract method

void registerFont(
  1. String fontName,
  2. String fontPath
)

Registers a font under a font name.

After registration, the font name can be used in

Repeated registration with the same font name is ignored.

  • fontName A font name.

  • fontPath A font file path. TTF, OTF and WOFF formats are supported.

Can be an asset file path or an absolute file path.

Implementation

void registerFont(String fontName, String fontPath);