"Font has not been found" issues

Hi!

Issue #1:
We get “Font ‘Century Gothic’ has not been found.” message via IWarningCallback in Linux. The font is accesible for the JVM, and made visible to Aspose via setFontsSources(). No problem with other fonts on this machine. Does font file name format matters? What conditions must be satisfied to ID and use the font?

Issue #2:
We get “Font ‘Arial’ has not been found.” message via IWarningCallback in Linux (differnent machine from #1). But Arial not used at all in the .dotx file. Why we get this warning then?

Thank You!

@EPluribusUnum

The font file name does not matter. We suggest you please use the code example shared in the following article to get the available fonts for rendering.
How to Get Available Fonts for Rendering

If you still face problem, please attach the following resources here for testing:

  • Your input Word document.
  • Please create a simple Java 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.

#1 : found the problem. The ttf file contained the name ‘Century’, not ‘Century Gothic’. Downloading a ttf with the correct name solved the problem.

#2 : also found the problem when I was building the simple Java application. The watermarking code added a new Shape (TEXT_PLAIN_TEXT). It’s default font was Arial. Setting the font family for the shape solved the problem.

@EPluribusUnum

It is nice to hear from you that you have found the solution of your query. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.