Description: Load custom fonts (only for React Native implementation). The return value specifies the name to access the font with, which might be different from the name you sent.

Request Parameters

Parameter NameTypeDescription
namestringName of the font you would like to keep
base64FontStringstringBase 64 encoded font file
typestringOnly 'ttf' supported for now

Resolves with the name of the font to be used. This might be different than the name sent earlier in the method parameters.
Rejects if there was an issue in adding the font.


sdk.loadFont('name', value, 'ttf').then((nameOfTheFont) => {
  console.log('Name received = ' + nameOfTheFont)
}).catch((err) => {
  console.log('Error received = ' + err)