load static method
void
load(
- String family,
- Uint8List bytes, {
- FontWeight weight = FontWeight.normal,
- FontStyle style = FontStyle.normal,
Registers a font from raw bytes.
family is the font family name used in TextStyle.fontFamily and
ParagraphStyle.fontFamily.
bytes must be a valid TTF or OTF font file.
Use weight and style to register multiple variants of the same family.
Implementation
static void load(
String family,
Uint8List bytes, {
FontWeight weight = FontWeight.normal,
FontStyle style = FontStyle.normal,
}) {
_registry.putIfAbsent(family, () => {})[_FontKey(weight, style)] = bytes;
}