stbtt_GetFontOffsetForIndex function

  1. @Native<Int Function(Pointer<ma_uint8>, Int)>(ffi.Pointer<ffi.UnsignedChar>, ffi.Int)>()
int stbtt_GetFontOffsetForIndex(
  1. Pointer<ma_uint8> data,
  2. int index
)

This function will determine the number of fonts in a font file. TrueType collection (.ttc) files may contain multiple fonts, while TrueType font (.ttf) files only contain one font. The number of fonts can be used for indexing with the previous function where the index is between zero and one less than the total fonts. If an error occurs, -1 is returned.

Implementation

@ffi.Native<ffi.Int Function(ffi.Pointer<ffi.UnsignedChar>, ffi.Int)>()
external int stbtt_GetFontOffsetForIndex(
  ffi.Pointer<ffi.UnsignedChar> data,
  int index,
);