AvenirNext LT Pro font fall back to Arial font when converting Word to PDF

Hi!

We have the attached fonts (Avenir next LT tff.zip) installed on our server running IIS. When we try to convert the attached word docx (test document avenir.docx) to pdf, the following fonts falls back to the default Arial font:

  • Avenir Next LT Pro
  • Avenir Next LT Pro Demi
  • Avenir Next LT Pro Light

When we look at the source document xml structure, we can see that Avenir Next LT Pro and Avenir Next LT Pro Light are used as expected. However Avenir Next LT Pro Demi can not be found in the xml structure even though it is installed.

An observation: the three non-working fonts has a different naming standard in Word. The other are named AvenirNext LT Pro… with no spacing, vs Avenir Next LT Pro (all of them are installed anyway).

test document avenir.docx (23.1 KB)
Avenir next LT tff.zip (587.6 KB)

@lars.olsson
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25995

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi again!

We found out that the problem in this case was that some of the fonts in the font package didn’t match with the fonts that were used in the Word document. The three versions of Avenir Next Pro LT that didn’t render as expected had different names set in the Win32FamilyNames attribute.

Those three versions had been downloaded as Cloud fonts by Word and were therefore rendered correctly in Word. We installed versions of the font that matched the Word document and now those fonts render correctly when exported to PDF through Aspose.Words.

To make it easier for us to double check that fonts are installed correctly, which metadata attribute in the .ttf file does Aspose.Words use to decide what font to use for PDF rendering?

@lars.olsson Aspose.Words uses font name and font family name in different variations. You can implement IWarningCallback to get notification when font is substituted. This will simplify further analysis of the fonts.

@lars.olsson We have completed analyzing the issue and decided to close it as ‘Wont Fix’. As you stated, the problematic fonts are downloaded by MS Word from cloud. Aspose.Words does not download Office cloud fonts by itself and also do not use cloud fonts folder as a font source by default. It is highly unlikely that we implement downloading fonts from MS cloud due to licensing questions. As a workaround you can add cloud fonts folder "%USERPROFILE%\AppData\Local\Microsoft\FontCache\4\CloudFonts".

The issues you have found earlier (filed as WORDSNET-25995) have been fixed in this Aspose.Words for .NET 23.10 update also available on NuGet.