title Type – RustTextAPI

type RustTextAPI = {
  resolveFont: (
    font: Partial<FontProps>,
  ) => number | null,
  resolveFontStack: (
    fonts: Partial<FontProps>[],
  ) => number[],
  setFonts: (fonts: Font[]) => void,
  measureFont: (
    fontId: number,
    size: number,
  ) => FontMetrics,
  measureSpans:
  (
    fontStack: number[],
    text: Uint16Array,
    size: number,
  ) => SpanMetrics,
  measureGlyph:
  (
    fontId: number,
    glyphId: number,
    size: number,
  ) => GlyphMetrics,
  findGlyph: (
    fontId: number,
    char: string,
  ) => [number, boolean],
  loadMissingGlyph:
  (
    fontId: number,
    glyphId: number,
    callback: (...args: any[]) => any,
  ) => void,
  debugListener: (
    cb: (...args: any[]) => any,
  ) => () => void,
}

Source

packages / glyph / src / types.ts

Sections
Source  
menu
format_list_numbered