LoadFontData method

  1. @override
List<GlyphInfoD> LoadFontData(
  1. Uint8List fileData,
  2. num fontSize,
  3. Int32List? codepoints,
  4. num? codepointCount,
  5. FontType type,
)
override

Implementation

@override
List<GlyphInfoD> LoadFontData(
  Uint8List fileData,
  num fontSize,
  Int32List? codepoints,
  num? codepointCount,
  FontType type,
) => run(
  () => RaylibDebugLabels.LoadFontData(fileData, fontSize, codepoints, codepointCount, type),
  () {
    // final glyphCount = _int1();
    final glyphs = rl.Core.LoadFontData(
      rl.Temp.UnsignedChar$.Array(fileData),
      fileData.length,
      fontSize.toInt(),
      codepoints == null ? nullptr : rl.Temp.Int$.Array(codepoints),
      codepointCount?.toInt() ?? codepoints?.length ?? 0,
      type.value,
      // glyphCount,
    );
    final requestedCount = (codepointCount == null || codepointCount == 0)
      // ? codepoints?.length ?? glyphCount.value
      ? codepoints?.length ?? 95
      : codepointCount.toInt();
    return .generate(requestedCount, (i) => (glyphs + i).toD());
  },
);