Aspose.Pdf.FontNotFoundException : Font FoundationSans-Bold was not found

Hi, team

Recently there has been no code change, however, today when I tried running the integration tests
font = FontRepository.FindFont(“FoundationSans-Light”); all my integration tests are failing.

The version being used v19.10.0
OS: windows11

Can someone please take a look?

@dfactset

Have you tried using 24.5 version of the API which is the latest one? Please let us know if issue is still there with the latest version by sharing a sample project. We will further proceed to assist you accordingly.

When using the latest version(24.5.1) on Windows 11, it works fine

However, on version 19.0.0 FontRepository.FindFont works fine on Windows 10. The issue is with Windows 11.

This is the code

static void checkFindFont()
{
Document doc = new Document();
Page page = doc.Pages.Add();
page.PageInfo.Width = Aspose.Pdf.PageSize.PageLetter.Width;
page.PageInfo.Height = Aspose.Pdf.PageSize.PageLetter.Height;
page.PageInfo.Margin = new Aspose.Pdf.MarginInfo(27, 27, 27, 27);

        TextFragment newText1 = new TextFragment("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG 1234567890");
        newText1.TextState.Font = FontRepository.FindFont(@"FoundationSans-Light");
        newText1.TextState.FontSize = 10;


        page.Paragraphs.Add(newText1);
  

        doc.Save("checkFindFont.pdf");
  }

I have installed Foundation Sans in window 11. Also it is not possible on our end to upgrade the version right away since we have many dependencies and breaking changes. Can you please check why this is happening in different OS?

image.png (53.1 KB)

@dfactset

We are afraid that we cannot say much about the reasons why this issue is happening with an older version. A lot of changes and improvements have been made since then. Also, Windows 11 was also release in 2021 Year. We request you please upgrade to the latest version of the API to get maximum fixes and improvements as we always recommend it. You can also obtain a 30-days free temporary license to evaluate the latest version and upgrade once all tests are passed.