LoadFontFromMemory method

Font LoadFontFromMemory(
  1. String fileType,
  2. Uint8List fileData,
  3. num fontSize,
  4. Int32List codepoints,
)

Load font from memory buffer, fileType refers to extension: i.e. '.ttf'

Implementation

Font LoadFontFromMemory(
  String fileType,
  Uint8List fileData,
  num fontSize,
  Int32List codepoints,
) => run(
  () => _debugLabels.LoadFontFromMemory(fileType, fileData, fontSize, codepoints),
  () => _flat.LoadFontFromMemory(
    String$.ValueOrNull(fileType),
    Uint8$.Array(fileData),
    fileData.length,
    fontSize.toInt(),
    Int$.Array(codepoints),
    codepoints.length,
  ),
);