type FontOptions = {
  weight?: number,
  style?: "normal" | "italic"
}

export async function registerFont (fontFamily: string, url: string, options: FontOptions = {}): Promise<void> {
  return new Promise<void>((res, rej) => {
    _creatorUI.registerFont(fontFamily, url, options, res, rej)
  })
}