# DocumentFontSource Class

> DocumentFontSource 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 > DocumentFontSource Class
- **621 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/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 |
|---|---|
| [Family](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/family-property/llms-full.txt) | Original font family. |
| [Base64](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/base64-property/llms-full.txt) | Base64 TrueType-outline bytes, limited to 32 MiB per face. |
| [Bold](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/bold-property/llms-full.txt) | Bold face; omitted infers font metadata. |
| [Italic](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/italic-property/llms-full.txt) | Italic face; omitted infers font metadata. |
| [Aliases](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/aliases-property/llms-full.txt) | Additional original workbook family names. |
| [Fallback](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/fallback-property/llms-full.txt) | Supply missing glyphs without replacing an available primary face. |
| [Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/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

- [DocumentFontSource.Aliases Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/aliases-property/llms-full.txt): DocumentFontSource.Aliases property in the TX Sheet Control .NET API, with its type IReadOnlyList<string>? and a C# example.
- [DocumentFontSource.Base64 Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/base64-property/llms-full.txt): DocumentFontSource.Base64 property in the TX Sheet Control .NET API: Base64 TrueType-outline bytes, limited to 32 MiB per face.
- [DocumentFontSource.Bold Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/bold-property/llms-full.txt): DocumentFontSource.Bold property in the .NET API: Marks the supplied TrueType face as bold; when omitted, the weight is read from the font metadata.
- [DocumentFontSource Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/constructor/llms-full.txt): DocumentFontSource constructor in the TX Sheet Control .NET API: Create settings before calling the central load/save methods.
- [DocumentFontSource.Fallback Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/fallback-property/llms-full.txt): DocumentFontSource.Fallback property in the TX Sheet Control .NET API: Supply missing glyphs without replacing an available primary face.
- [DocumentFontSource.Family Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/family-property/llms-full.txt): DocumentFontSource.Family property in the TX Sheet Control .NET API: The original font family name that the supplied TrueType face stands in for.
- [DocumentFontSource.Italic Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/italic-property/llms-full.txt): DocumentFontSource.Italic property in the .NET API: Marks the supplied TrueType face as italic; when omitted, the style is read from the font metadata.

---

## Nearby

- **Previous:** [PivotValueField.BaseItem Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/pivotvaluefield/baseitem-property/llms-full.txt)
- **Next:** [DocumentFontSource.Family Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/documentfontsource/family-property/llms-full.txt)
