# DocumentFontOptions Constructor

> DocumentFontOptions constructor in the TX Sheet Control .NET API: Create settings before calling the central load/save methods.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Constructor
- **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 > DocumentFontOptions Constructor
- **310 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/constructor/llms-full.txt

---

Create settings before calling the central load/save methods.

### 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);
}
```

---

## Nearby

- **Previous:** [DocumentFontOptions.Substitutions Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontoptions/substitutions-property/llms-full.txt)
- **Next:** [ISheetControl Interface](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/isheetcontrol/llms-full.txt)
