FontIndex>= v1.0.26
FontIndex:
A FontIndex is the preferred way to add additional fonts to the system.
Document Authoring can efficiently load a single index of available fonts, and will then only load the actually required fonts as they
are needed by calling loadFn with the font name. loadFn must return a BlobInput for the font file requested.
In order to generate a font index from a set of fonts you want to provide to your users, use the Document Authoring CLI utility:
npx document-authoring create-font-index --scan-directory path-to-fonts --write-to font-index.jsonThis will generate a font-index.json file that you can then host and load using the FontIndex configuration.
Example
Section titled “Example”{ type: 'index', index: fetch('/fonts/font-index.json'), loadFn: (name) => fetch(`/fonts/${name}`),}FontConfig for configuring fonts, including using FontIndex.
Properties
Section titled “Properties”type:
"index"
index:
BlobInput
loadFn()
Section titled “loadFn()”loadFn: (
name) =>BlobInput