FontResolutionRequest.text Property
Existing text collected for this requested face; use it to choose a font with appropriate character coverage.
Syntax
text: string;
Example
import { StreamType, type ServerSheetControl, type DocumentFontLoadOptions } from '@txtextcontrol/tx-sheet-control-server';
async function loadInvoice(editor: ServerSheetControl, inputBytes: Uint8Array, fontBase64: string) {
const fonts: DocumentFontLoadOptions = {
resolve: async request => ({
family: request.family,
bold: request.bold,
italic: request.italic,
base64: fontBase64
})
};
await editor.load(inputBytes, StreamType.OpenDocumentSpreadsheet, { fonts });
}