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

Free Support Forum - aspose.com

Aspose.Words - missing fonts on MacOS

Dear Aspose Team,

We are evaluating our use with Aspose.Words to read, parse and convert Word documents.
We have encountered a problem when using Hebrew fonts and converting the document to a static format, such as PDF on MacOS machines.

We searched and queried your help forums and documentation, and tried to set up DefaultFontName under the FontSettings class for this document, with no success.

The result of the conversion is a text filled with empty glyphs (empty rectangles) instead of the correct text.

Have you encountered this issue before and can you show us the way to solve it?
If its an unknown problem, what will it take to fix the problem?

Thank you,
Ran

@randan,

Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when rendering document to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts (e.g. Hebrew) that are used in your document on the machine where you’re converting documents to PDF. Please refer to the following article:

How Aspose.Words Uses True Type Fonts

If you still face problem, please ZIP and attach Hebrew font and input Word document here for testing. We will investigate the issue on our side and provide you more information.

Hey @tahir.manzoor,
We checked out those sources before and came to the conclusion that the Default font sources are invalid.
When we added the following code:

                        var fontSources =
                            new ArrayList(fontSettings.GetFontsSources())
                            {
                                new FolderFontSource("/Library/Fonts", true)
                            };
                        var updatedFontSources = (FontSourceBase[])fontSources.ToArray(typeof(FontSourceBase));    

everything worked, including all fonts installed on the machine,
it seems that the font source of /Library/Fonts isn’t working be default.

Thank you for your support.

@randan,

Thanks for your feedback. It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.