requestFontSelection

API reference for the requestFontSelection method.

Prompts the user to choose a font that can be used within Canva.

#requestFontSelectionRequest
Optional

Options for configuring a font picker.

Properties of request
#selectedFontRefFontRef
Optional

The ref of a font to display as selected when the font picker is opened.

The result of selecting a font from a font picker. This is a Promise that resolves with the following object:

#fontFont

The selected font.

Properties of font
#namestring

The name of the font.

#refFontRef

A unique identifier that points to a font asset in Canva's backend.

#weightsFontWeight[]

The available font weights for the font.

Properties of weights
#stylesFontStyle[]

The font styles available for this specific font weight.

The available options include:

  • "normal"
  • "italic"
#weightFontWeightName

The name of the font weight.

The available options include:

  • "normal"
  • "thin"
  • "extralight"
  • "light"
  • "medium"
  • "semibold"
  • "bold"
  • "ultrabold"
  • "heavy"
#previewUrlstring
Optional

The URL of an image that renders a preview of the font.

#typestring

The type of result.

This must be "completed".