Example
Create a custom font for retrieving "Arial.ttf"
new NutrientViewer.Font({
name: "Arial.ttf",
callback: name => fetch(`https://example.com/${name}`).then(r => r.blob())
})
Nutrient Web SDK
Create a custom font for retrieving "Arial.ttf"
new NutrientViewer.Font({
name: "Arial.ttf",
callback: name => fetch(`https://example.com/${name}`).then(r => r.blob())
})
On Standalone, this callback receives the name of a font to retrieve as an argument and you can return from it a
Promisethat resolves to aBlobwith the font data to use.See this guide to learn more.