# DocumentFontSource Interface

> DocumentFontSource interface in the Angular package: A document-scoped TrueType font face with base64 bytes, weight, style and fallback aliases.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Angular > DocumentFontSource Interface
- **504 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/llms-full.txt

---

Supply a document-scoped TrueType font face with base64 bytes, weight, style and fallback aliases for TX Sheet Control loading and saving.

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

### Properties

| Property | Description |
|---|---|
| [family](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/family-property/llms-full.txt) | Font family used by the workbook; styles retain this name. |
| [base64](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/base64-property/llms-full.txt) | Base64-encoded TrueType-outline font bytes, limited to 32 MiB per face. |
| [bold](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/bold-property/llms-full.txt) | Bold face; omitted infers the font metadata. |
| [italic](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/italic-property/llms-full.txt) | Italic face; omitted infers the font metadata. |
| [aliases](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/aliases-property/llms-full.txt) | Additional workbook family names that this font face can resolve. |
| [fallback](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/fallback-property/llms-full.txt) | Use this face only for missing characters while retaining an available primary embedded face. |

### Example

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

async function loadInvoice(editor: Spreadsheet, inputBytes: Uint8Array, fontBase64: string) {
    const face: DocumentFontSource = { family: 'Invoice Sans', base64: fontBase64 };
    await editor.load(inputBytes, StreamType.OpenDocumentSpreadsheet, { fonts: { sources: [face] } });
}
```

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

- [DocumentFontSource.aliases Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/aliases-property/llms-full.txt): DocumentFontSource.aliases property in the TX Sheet Control Angular package: Additional workbook family names that this font face can resolve.
- [DocumentFontSource.base64 Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/base64-property/llms-full.txt): DocumentFontSource.base64 property in the TX Sheet Control Angular package: Base64-encoded TrueType-outline font bytes, limited to 32 MiB per face.
- [DocumentFontSource.bold Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/bold-property/llms-full.txt): DocumentFontSource.bold property in the TX Sheet Control Angular package, with its type boolean and a TypeScript example.
- [DocumentFontSource.fallback Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/fallback-property/llms-full.txt): DocumentFontSource.fallback property in the Angular package: Use this face only for missing characters while retaining an available primary embedded face.
- [DocumentFontSource.family Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/family-property/llms-full.txt): DocumentFontSource.family property in the TX Sheet Control Angular package: Font family used by the workbook; styles retain this name.
- [DocumentFontSource.italic Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/italic-property/llms-full.txt): DocumentFontSource.italic property in the TX Sheet Control Angular package: Italic face; omitted infers the font metadata.

---

## Nearby

- **Previous:** [WorkbookDocument Type](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/workbookdocument/llms-full.txt)
- **Next:** [DocumentFontSource.family Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/angular/documentfontsource/family-property/llms-full.txt)
