DocumentFontSource.Fallback Property
- Namespace
TXTextControl.TXSheetControl. Server
- Package
TXTextControl.asTXSheetControl. Server TXTextControl.from the private NuGet feed or the supplied NuGet folderTXSheetControl. Api. dll
- Also in
TXTextControl.asTXSheetControl. Blazor TXTextControl.TXSheetControl. Api. dll
Supply missing glyphs without replacing an available primary face.
Syntax
public bool? Fallback { get; init; }
Example
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);
}