SetFontSource() for Aspose.Pdf

When deploying an an aspnet WebApplicaiton on Linux aspnet:6.0 image, we have a small set of installed fonts available, and due to security on the image I am unable to install more fonts on the system.
Aspose Imaging and Words provide the following static calls to make local application fonts available:

Aspose.Imaging.FontSettings.SetFontsFolders()
Aspose.Words.Fonts.FontSettings.DefaultInstance.SetFontsSources()

How can I set the font source inside my app directory for Aspose.Pdf?
I am building a Docker image, but I do not have permission to install True Type Fonts, or write files outside my app directory.

@mcrose
You shoud use the following

FontRepository.Sources.Add(new FolderFontSource("Fonts"));
1 Like