# DocumentFontLoadOptions Interface

> DocumentFontLoadOptions interface in the TX Sheet Control TypeScript API for the browser, with its syntax and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > DocumentFontLoadOptions Interface
- **447 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/documentfontloadoptions/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/documentfontloadoptions/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/documentfontloadoptions/llms-full.txt

---

Configure document font bytes, asynchronous resolution and family substitutions while loading TX Sheet Control workbooks in TypeScript applications.

Package: `@txtextcontrol/tx-sheet-control`. This is a type-only contract.

### Properties

| Property | Description |
|---|---|
| [sources](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/documentfontloadoptions/sources-property/llms-full.txt) | Document font bytes supplied by the application before loading. |
| [substitutions](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/documentfontloadoptions/substitutions-property/llms-full.txt) | Original workbook family to deployed or supplied family. Names in cell formatting are preserved. |
| [resolve](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/documentfontloadoptions/resolve-property/llms-full.txt) | Optional asynchronous JavaScript resolver, awaited before document replacement. Return a usable face or undefined to retain the normal font policy. |

### Example

```typescript
import { StreamType, type Spreadsheet, type DocumentFontLoadOptions } from '@txtextcontrol/tx-sheet-control';

async function loadInvoice(editor: Spreadsheet, 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 });
}
```

Font registration is scoped to the loaded document. The shared renderer uses the same faces for editor layout and PDF output. A load failure or cancellation retains the existing workbook.

---

## In This Section

- [DocumentFontLoadOptions.resolve Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/documentfontloadoptions/resolve-property/llms-full.txt): DocumentFontLoadOptions.resolve property in the TX Sheet Control TypeScript API for the browser, with a TypeScript example.
- [DocumentFontLoadOptions.sources Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/documentfontloadoptions/sources-property/llms-full.txt): DocumentFontLoadOptions.sources property in the TX Sheet Control TypeScript API for the browser: Document font bytes supplied by the application before loading.
- [DocumentFontLoadOptions.substitutions Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/documentfontloadoptions/substitutions-property/llms-full.txt): DocumentFontLoadOptions.substitutions property in the browser TypeScript API, with its type Readonly<Record<string, string>> and a TypeScript example.

---

## Nearby

- **Previous:** [FontResolutionRequest.signal Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/fontresolutionrequest/signal-property/llms-full.txt)
- **Next:** [DocumentFontLoadOptions.sources Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/documentfontloadoptions/sources-property/llms-full.txt)
