# DocumentFontOptions Class

> DocumentFontOptions class in the .NET API: Document-local TrueType fonts and substitutions for loading and saving without installing operating-system fonts.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > DocumentFontOptions Class
- **482 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/llms-full.txt

---

Configure document-local TrueType font resources and substitutions for TX Sheet Control loading and saving without installing operating-system fonts.

### Members

| Member | Description |
|---|---|
| [Sources](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/sources-property/llms-full.txt) | Document-local font bytes supplied at load/save time. |
| [Substitutions](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/substitutions-property/llms-full.txt) | Original family to deployed or supplied family; cell formatting names are preserved. |
| [Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/constructor/llms-full.txt) | Create document font settings. |

### Constructor

Create settings with an object initializer before loading or saving a workbook.

### Example

```csharp
using TXTextControl.TXSheetControl.Server;

static async Task ConfigureInvoiceFontsAsync(ServerSheetControl control, byte[] workbookBytes, string fontPath)
{
    var options = new LoadOptions
    {
        Fonts = new DocumentFontOptions
        {
            Sources = [new DocumentFontSource
            {
                Family = "Invoice Sans",
                Base64 = Convert.ToBase64String(await File.ReadAllBytesAsync(fontPath))
            }]
        }
    };
    await control.LoadAsync(workbookBytes, StreamType.OpenDocumentSpreadsheet, options);
}
```

---

## In This Section

- [DocumentFontOptions Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/constructor/llms-full.txt): DocumentFontOptions constructor in the TX Sheet Control .NET API: Create settings before calling the central load/save methods.
- [DocumentFontOptions.Sources Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/sources-property/llms-full.txt): DocumentFontOptions.Sources property in the TX Sheet Control .NET API: Document-local font bytes supplied at load/save time.
- [DocumentFontOptions.Substitutions Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/substitutions-property/llms-full.txt): DocumentFontOptions.Substitutions property in the .NET API: Original family to deployed or supplied family; cell formatting names are preserved.

---

## Nearby

- **Previous:** [DocumentFontSource Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/constructor/llms-full.txt)
- **Next:** [DocumentFontOptions.Sources Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/sources-property/llms-full.txt)
