Generation pdf from Xslfo cause font issue

I am trying to generate pdf from xslfo and am experienced with the font issues
FontRepository.Sources.Clear();
FontRepository.Sources.Add(new
FolderFontSource(_fileSystem.GetAbsolutePathFor(Path.Combine(“Document”, “Fonts”))));
var defaultFont = FontRepository.FindFont(“Open Sans Regular”);

using var document = new Aspose.Pdf.Document(xslFoStream, new XslFoLoadOptions());

After document instance created: document.FontUtilities.GetAllFonts() returns list of fonts (Arial, Times New Roman)

var pdfStream = new MemoryStream();
document.Save(pdfStream, new PdfSaveOptions { DefaultFontName = defaultFont.BaseFont });

After saving target font has not been applied. Please advise.

@Memoty

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input PDF and “Open Sans Regular” font.
  • Please attach the output PDF file that shows the undesired behavior.
  • Please attach the expected output PDF file that shows the desired behavior.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

I have created .Net Core console application which based on XslFO, generates pdf files using fonts stored in the solution.

actualResult.pdf - represents generated file
Actual result: font in pdf fall back to Times New Roman (on docker pod it is fallback to DejaVu Sans)
Expected result: pdf rendered with specified fond (OpenSans.ttf)

Also, is there any documentation or guide on how to configure fontconfig on my debian docker container to avoid using the default DejaVu?

Please advise

@Memoty

Please read the following article to achieve your requirement.
How to run Aspose.PDF in Docker

We have logged this problem in our issue tracking system as PDFNET-52647. We will inform you once there is an update available on it. We apologize for your inconvenience.