API reference
Design
addAudioTrackaddElementAtCursoraddElementAtPointaddNativeElementaddPagecreateRichtextRangeeditContentgetCurrentPageContextgetDefaultPageDimensionsgetDesignTokeninitAppElementoverlay.registerOnCanOpenopenDesignrequestExportselection.registerOnChangesetCurrentPageBackgroundui.startDragToCursorui.startDragToPointui.startDrag
Platform
appProcessappProcess.broadcastMessageappProcess.currentappProcess.current.getInfoappProcess.current.requestCloseappProcess.current.setOnDisposeappProcess.requestCloseappProcess.registerOnMessageappProcess.registerOnStateChangefeatures.isSupportedfeatures.registerOnSupportChangegetPlatformInforequestOpenExternalUrl
requestFontSelection
API reference for the requestFontSelection method.
This version of the API is in beta. Beta APIs are unstable and may change without warning. You can't release public apps using this API until it's stable.
Prompts the user to choose a font that can be used within Canva.
Parameters
request
FontSelectionRequest
OPTIONAL
Options for configuring a font picker.
Properties of request
selectedFontRef
FontRef
OPTIONAL
The ref of a font to display as selected when the font picker is opened.
Returns
The result of selecting a font from a font picker. This is a Promise
that resolves with the following object:
type
string
The type of result.
This must be "completed"
.
font
Font
The selected font.
Properties of font
ref
FontRef
A unique identifier that points to a font asset in Canva's backend.
name
string
The name of the font.
weights
FontWeight[]
The available font weights for the font.
Properties of weights
weight
FontWeightName
The name of the font weight.
The available options include:
"normal"
"thin"
"extralight"
"light"
"medium"
"semibold"
"bold"
"ultrabold"
"heavy"
styles
FontStyle[]
The font styles available for this specific font weight.
The available options include:
"normal"
"italic"
previewUrl
string
OPTIONAL
The URL of an image that renders a preview of the font.
type
string
The type of result.
This must be "aborted"
.