Hi,
We use Aspose.Cells to convert excel files to PDF, some of this files have custom fonts, that are not presented in a system so we load them as memory fonts.
Here is the code that we use to load them:
var tenantFonts = await LoadFonts(); // downloads ttf files from the storage
var memoryFontSources = tenantFonts.Select(f => new MemoryFontSource(f)).Cast<FontSourceBase>().ToArray();
var individualFontConfigs = new IndividualFontConfigs();
individualFontConfigs.SetFontSources(memoryFontSources);
var workbook = new Workbook(sourceStream,
new LoadOptions()
{
FontConfigs = individualFontConfigs,
});
await using var outputStream = new MemoryStream();
workbook.Save(outputStream, SaveFormat.Pdf);
Is there a way to set a fallback font in this case? The only available API seems to be:
individualFontConfigs.SetFontSubstitutes
But it seems that it’s only possible to do on a font basis. Can we set a fallback for all Latin characters for example? Or a fallback for all Asian characters? Like in Aspose.Words for example.