We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Set Fallback font for all Latin characters

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();
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:


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.


Could you please elaborate your requirements a bit. Also, share sample Excel file and expected output PDF. Moreover, share examples and sample scenario/use case on what Aspose.Words can implement it. We will then evaluate if we could implement the same thing in Aspose.Cells.

1 Like